Re : Cascaded dropdowns/models
Thanks Matt,Exactly that is what I was looking for :)Ricardo ObregónYiiFramework developer, UX consultant
View Articleusing both .ejs and .mustache templates?
We're using can 1.1.8 and would like to start replacing our .ejs templates with .mustache templates. While this refactoring is going on, we'll need both template languages to work. (not in the same...
View ArticleRe : using both .ejs and .mustache templates?
If you are staying on 1.1.8, you just need to include the Mustache plugin and that's it. Your .mustache files will be parsed and rendered using Mustache and your .ejs files will work as before using...
View ArticleRe : using both .ejs and .mustache templates?
Thanks for the quick response Curtis! Adding the plugin worked like a charm.
View ArticleRe : Cascaded dropdowns/models
It's also worth noting that you can create new lists passing deferreds, so you could just as easily use new can.List(Cities.findAll) or otherwise use new Cities.List({ state: 'CA'}) to create a...
View ArticleRe : Getters and setters with can.Map
Assuming I dont care when a property is added or removed, how would you integrate the getter/setter with the can.Construct.extend method?The thing is that for the use case I posted above ("NativeMap"...
View ArticleRe : Re: Data-Driven Javascript Controls -- What about checking checkboxes?
I think it's worth noting that you can also use can.Components to setup new scopes, and create relationships between your scopes to further separate concerns. This sort approach works well when you...
View ArticleRe : Getters and setters with can.Map
There are a lot of other advantages to using attr that I think you're overlooking:attr gets deeply nested objects - useful for computesattr resolves computesattr gives you flexibility on what you're...
View Articlecan.Control initialisation
Hi all,First off, thanks for a great JS MVC framework, I've been using JSMVC for a few projects and am now embarking on our first CanJS project.Secondly, as implied, I'm quite new to CanJS so hope this...
View ArticleRe : can.Control initialisation
Typically you would expect that when a Control is initialized the element is on the page already. I would recommend removing that code from your init and putting it in the code that calls new...
View ArticleCustom view render
Hi,I have a Control that maintain a list of texts and I want to render them using a quite complex view. I would like to create a template that renders text in paragraph and inserts as much paragraphs...
View ArticleRe : Getters and setters with can.Map
So, if I use the attr method on an object like this : { a : { b :1, c:2},e:9}, I could use like this: obj.attr('a.b')? I think i read somewhere in the forums that that isn't possible.
View ArticleRe : Getters and setters with can.Map
Yes, you can use attr to read nested objects. Not only that, but you can read nested attributes, completely ignoring if something exists currently, and if any of the attributes are computes.For...
View ArticleRe : can.Control initialisation
You might want to consider using more template driven techniques here. You can either make a helper function that'll initialize your controller when an element is inserted, and make the entire block...
View ArticleRe : Custom view render
This is a great question, because it delves into some of the tricky things that you can pull off in Mustache helpers, using can.view.hook, can.view.live, and the "inserted" event. In fact, it took me...
View ArticleRe : Moving DOM Elements Containing Components
What are you doing in 'inserted' that you don't want to happen the second time?
View ArticleRe : Moving DOM Elements Containing Components
Instantiating a jQuery plugin for example.
View ArticleRe : Moving DOM Elements Containing Components
What you're trying to do sounds fishy. A DOMElement instance or fragment can only be in one node of the dom; appending DOMElements is an insert or move operation. If you make a document fragment, and...
View ArticleRe : Custom view render
Wow .. thank you very much for your help. You are right it's a bit hard to understand for me. Could you please explain me more deeper what you done in your example?Thanks
View Article