Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : How do I do the equivalent of compute.on/compute.off while using can.Map.define?

$
0
0
Let's say that I rework this, and use a getter instead. That still posses the issue that I have no way treat that getter like a compute, and make it update when other properties change, such as route, query, page etc.

The second half of the issue is really how to manage deferreds. I was leaning towards a setter to utilize the async value setter so that once my route changes, it could query the respective document(s), and only emit change events after that deferred has been queried, and all getters would be accessing the end document.

Is it ill-advised to use can.route.map as a model loader? I was experimenting with the concept of mapping crud loading to can.route.map such that route each pretty route would correlate with a template, and whenever can.route.attr('route') changed, it would replace my #app html with the respective template, using can.route.map as the base viewScope.

Viewing all articles
Browse latest Browse all 3491

Trending Articles