CanJS as controller of controls from another framework?
Hi all - I'm wondering if anyone knows of any good examples I can learn from before I attempt to build the following myself:I'm building a single-page app using controls from another framework,...
View ArticleRe : Binding To Changes on Models In A List
Thanks dude.It looks like the attr argument is prepended with the array index. I am seeing0.propertyNameSound about right?
View ArticleRe : How to store DOM in a controller without create memory leak ?
I don't believe that really answers my question.I have a main controller. It creates a bunch of sub controllers like so:this.someControl = new SomeControl( "elementID", { options} )If the "elementID"...
View ArticleRe : Binding To Changes on Models In A List
YesSent from my iPhoneOn Apr 7, 2013, at 1:41 PM, JavaScriptMVC Forum <noreply@zohodiscussions.com> wrote:
View ArticleRe : How to store DOM in a controller without create memory leak ?
If you have huge amount of child controls with references in your parent control and you want garbage collector to clear up everything that is related to these controls (besides event handlers and data...
View ArticleRe : How to create a filtered list?
Take a look at this thread. It deals with EJS, but you can accomplish the same thing with live binding in Mustache or using Mustache helpers.
View ArticleRe : How to render an inverted list in mustache?
You can write a Mustache helper to do whatever you want. So you could create one that takes an Array (or similar "list") and iterates over it in reverse order.Take a look at the each helper in...
View ArticleRe : How to render an inverted list in mustache?
Thanks,Here is working example for anyone interested:http://jsbin.com/ejavub/1/edit
View ArticleRe : How to create a filtered list?
ThanksI created an example herehttp://jsbin.com/uziyaj/1/edit
View ArticleRe : How to create a filtered list?
There also is a list plugin in the works here. It creates a live bound filtered list, meaning that it will also be synchronized with the original list (e.g. if the filter condition for an item changes...
View ArticleRe : How to create a filtered list?
@daff your comment seems to imply that a mustache helper does not sync changes on the list. But this seems to work fine, see http://jsbin.com/uziyaj/3/editAm I missing something?
View Articlecan.Control Templated Event Handlers
Is it possible to have {a} trigger in this Fiddle without changing the hierarchy of the options object?
View Articlemodel.attr() in the view template?
Hello there,I can't seem to find how EJS files should get model properties. I know that within models and controllers you use this.attr('foo') but what about in EJS files?<%= model.attr('foo');...
View ArticleRe : model.attr() in the view template?
Yes it would. Providing you wanted to setup live-binding.If you do as you show above live-binding will be enabled. What that means is that whenever the value of the "foo" property changes (as long as...
View ArticleRe : can.Control Templated Event Handlers
I don't believe you can listen to changes on a primitive (string in this case).
View ArticleRe : model.attr() in the view template?
Great stuff! Thanks for your response countofzero.
View ArticleRe : can.Control Templated Event Handlers
The sentence "Values inside {NAME} are looked up on the control’s this.options . . ." in "Templated Event Handlers Pt 1" gives the impression that the {value} is looked up.So I passed an Observe as...
View ArticleRe : can.Control Templated Event Handlers
can.Control is doing exactly what that sentence says it will.options.a is the string "initial A value" and options.b is an Observe. Obviously {a} won't work because it is a string, but {b} will because...
View Articlecan.Observe.List behavior
Hello,I need a little help with observable lists. I was expecting that splicing or pushing an array of observes on to an existing observe.list would keep things contiguous but am seeing something...
View ArticleRe : can.Control Templated Event Handlers
That's why I passed "options" as an Observe, so the string 'a' will be inside an Observe like the string 'c' is inside 'b' and therefore triggers.vcTest.options is an Observe in this example.But your...
View Article