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

Re : CanJS and Ruby On Rails

$
0
0

So it seems that can.Component needs to have the template loaded prior to the declaration, make sense when doing `template: can.view('t-toolbar')`. I haven't come across this issue before because we load our application code at the bottom of the page. Maybe you can try doing that. This fiddle shows this problem http://jsbin.com/kiqen/1/edit.

Not sure why CanJS is trying to do a GET request to get the template.

Another thing we do is to declare modules and dependencies, this might also make a difference. See http://reinteractive.net/posts/172-a-better-way-to-modularise-your-js-in-rails

I also wonder if that SMT gem compiles the mustache template in a way that is compatible with CanJS.


Viewing all articles
Browse latest Browse all 3491

Trending Articles