how do i pass the url as object?
This is my HTML template: <article class="mn_dotw mn_sect" data-title="Online Deal of the Week"...
View Articlehow to catch 404s with can.route.pushstate
This works fine for <a href="/app/broken-link/">asdf</a> but not for <a href="/app/deep/broken/link">asdf</a>. I'd rather not add infinite amounts of...
View ArticleIs it a good practise to have one base model and call different finaAll for all?
So I have many sections to access thorught the dom elements, but all contain the same set of parameters.say sections would be A, B, C, D and each section is in the html with same set of parameters.So...
View ArticleRe : Anyone using something other than jQuery and Zepto?
I think it would still be a good idea to formalize the API that CanJS relies on with something like Universal.js but only add implementations for jQuery, Zepto and a standalone version.If anybody is...
View ArticleRe : Is it a good practise to have one base model and call different finaAll...
Thanks for the help I got what exactly u meant. But just a final question is it a good thing to create a model dynamically as in with respect to above mentioned comments .Suppose I have a base model...
View ArticleRe : Loading parent controllers when accessing a bookmarked url
Yes,Basically users/profile/1 requires several DOM elements to exist in the window before loading the actual profile template, but those elements are loaded by users/dashboard/1 which is not called...
View ArticleRe : Is it a good practise to have one base model and call different finaAll...
I am not sure what you mean. By "create a model dynamically" do you mean a model instance or a model 'class'?Also,Suppose I have a base model which makes the ajax call and I am creating Instances of...
View ArticleRe : Anyone using something other than jQuery and Zepto?
I think it would still be a good idea to formalize the API that CanJS relies on with something like Universal.js but only add implementations for jQuery, Zepto and a standalone version.If anybody is...
View ArticleRe : how to catch 404s with can.route.pushstate
We found a way to do this our app -- both with and without doing that "nullrouter" thing I'd posted about before.Without any modifications to routing, you can use can.route.attr('route') to get the...
View ArticleRe : Loading parent controllers when accessing a bookmarked url
I think we have/use something similar to what you're describing -- it's in CanJS, but I think the same pattern would work fine in javascriptMVC. This is a fairly recent change in our app, so we're...
View ArticleRe : how to catch 404s with can.route.pushstate
A possible API could be a callback function from ready():can.route.ready(function(error){ console.log(error);});However, that doesn't look as nice as something in a can.Component's events:{}...
View ArticleHow do you use model.save on only a subset of field?
If you have a need for additional attributes in your can.Model, how do you prevent your additional attributes from being including in save?
View ArticleHow do you manage nested can.Maps/can.Models
For example, lets say I have a post model, and a comment model, and my post model api returns comments as a sub-document array. In this scenario, how would I go about initializing my comment model...
View ArticleRe : How do you use model.save on only a subset of field?
When I don't want to send some attributes on server I override serialize method and remove properties to goserialize: function(val){ var serialized = this._super(val) delete serialized.someAttr...
View ArticleRe : how to catch 404s with can.route.pushstate
Spautz, that doesn't work at all with the code in my original post. Is there something else that I need to add to it, or does it require nullrouter?
View ArticleRe : grunt-steal-node
Hi, Node version of steal is still highly experimental. I think the grunt task might be broke currently. Try running "steal build apps/app" from the command line though. You'll have to run "npm...
View ArticleRe : Mustache Template for CSS
If you're doing dynamic themes, then simply load a stylesheet from the server, and implement all your generation logic there. Any other styling should be done by toggling classes, including most...
View ArticleRe : how to catch 404s with can.route.pushstate
ready is probably not an appropriate place for it. Its very likely someone would want to be able to setup listeners for this before .ready() is called.
View ArticleRe : how to catch 404s with can.route.pushstate
Doh. It shouldn't require nullrouter: the above snippet is based on the last commit before we gave up and tried the nullrouter idea. I think we were using 2.0.1 or 2.0.2 at the time -- it's very...
View Article