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

Re : Trouble trying to create a CanJS small widget

$
0
0
Yes.  I tried your code out in a fiddle, and the problem is the {{#each}} helper you are using with Dosare.  It is iterating over the promise returned by Dosare(), and not waiting for it to resolve, so those blank lines you see are actually from iterating resolve, resolveWith, reject, rejectWith, etc.  To fix this, just use {{#Dosare}} instead of {{#each Dosare}}

This makes a little sense, since {{each}} is meant to incrementally update lists, but since you are returning promises, your values are immutable and must be recreated with new promises, returning new lists, each time Dosare is called -- you cannot get the benefit of using {{each}}

Viewing all articles
Browse latest Browse all 3491

Trending Articles