Re : Howto: listen for view change event?
Thanks! Makes sense for me. I'm using 2.0.5 so this kind of syntax should be available.
View Articlecan.fixture and requests distinguishing by query params
Hello.I'm using service, which works via GET and sends request params via query string. I want to map fixtures for URLs with different query strings. It is possible to achieve with can.fixture(url,...
View ArticleRe : Howto: listen for view change event?
BTW, where can I get 2.1? I just see 2.0.6 in https://github.com/bitovi/canjs
View ArticleRe : Howto: listen for view change event?
There's a download sneakily hidden in the website tree:https://github.com/bitovi/canjs.com/archive/minor.zip
View ArticleRe : Undocumented packages
So if I include queue in the module all Models initiated within will behave queued way?
View ArticleIs there any can.Construct equivalent to the sugar event syntax?
Hey guys,I've found that one of the best parts of using can.Component and can.Control is the very straightforward way it allows you to bind to events within your scope/options. Is there any equivalent...
View ArticleWhere should I be storing my Model data?
I make a request to an end point with something like this:MyModelClass.findAll().done(function(response) { // And I get a Can model list back as 'response'});Ok, so I need this data for my view...
View ArticleFixture request does not work why ?
Hi I am working on a project that use fixture, the problem is when I create a new element with the model create function that use fixture to simulate ajax. Nothing happens on the screen eventough I...
View ArticleRe : Where should I be storing my Model data?
Hi,You can pass the data models to the view with control options or inside control:can.Control.extend('MyControl',{ init:function(el,opts){ //issume params var params={...
View ArticleRe : Where should I be storing my Model data?
Interesting, so this exactly how I'm doing now as well. I'll set this.options.modelData to the response and just listen with {modelData} change: function() ... so figured the observable object should...
View ArticleNested controls in a live binded template
Hi,I'm using CanJS 1.1. I have a tabs Control and each tab has a Resources control. The tabs "state" is represented by an Observe object.In my tabs Control, I render a "placeholder", e.g. "<div...
View ArticleTurbolinks with CanJS
I an new to CanJS and just starting to get familiar with it. I am integrating it with our Rails 4 project and I am wondering if anybody has tried to use CanJS with Turbolinks?...
View ArticleWhy use Models.model()
Hello,I wanted to know why one would use Models.model()? I understand that this function converts data into a $.List of $.Model instances but I don't understand when you would want to do this or why....
View ArticleRe : Nested controls in a live binded template
There are a few strategies you can use for this. We had a similar problem to solve with our TreeViewController, which renders nodes and sublists based on nested data, and was built long before...
View ArticleRe : Where should I be storing my Model data?
Is anyone doing this differently? Does everyone store their observable model objects on the option's property of a control?
View ArticleRe : Where should I be storing my Model data?
You can use can.Component that has build-in scope object (which is extended can.Map) and that is available in component's events (which is actually build-in can.Control) for binding.
View ArticleRe : Why use Models.model()
Just one use case: say you have two Models Artist and Album. Updated Album data arrives with nested artist data, and you want artist data (artist attribute) be converted into Artist instance.Using...
View ArticleRe : Turbolinks with CanJS
I think nothing should be done, can.js should clean everything up wen elements are removed.
View ArticleRe : Why use Models.model()
I see how you would convert the artist attribute to an artist instance, but why would you want to? Would it be a case where you needed some $.Model methods or attributes that were not available on...
View ArticleRe : Why use Models.model()
Yes for example when you want to treat artist as an independent instance (you may want to update/save it independently, you may want some custom methods/properties/converts on Artist as well), you may...
View Article