Thanks Tom. That's a great start and sounds like a good game plan. Build process is ideal but a little ways down the road.
EDIT: Sorry, check the 1st part. Just realized we didn't have can.mustache loaded as part of our can package. Works now! Keep it in for others.
For some reason I can NOT get my mustache template to render the data. It renders as the literal string. For example, inside control init() I have:
- var x = can.view( options.view, {userName: 'Joe'} );
- console.log ( x ); // frag comes back but without rendered data
And inside external template is:
- <h3>Welcome {{ userName }}</h3>
x is being returned as a docFrag but the text for the h3 is static Welcome {{ userName }}. Any thoughts on why the data isn't being picked up by the mustache tag?
Also, will a method such as findAll() on a model always return a deferred in order to utilize $.then and $.done?