Closed amalagaura closed 13 years ago
Sorry for the bad formatting, dunno what is with this damn markdown
You must require knockout
before requiring any of your code (require_tree .
.)
So change your application.js to:
//= require jquery
//= require jquery_ujs
//= require knockout
//= require_tree .
I try the example as follows:
And I get this generated javascript
And I get the error that ko is not defined: , but knockout.js is loaded with it's dependencies. And when I do a ko or ko.model from the console, it is defined. is it because this is not waiting for all javascript resources to load before executing? It's tough to show, so here is a screenshot.
http://i.imgur.com/99McT.png
Here is contents of application.js