Re : How do you connect the model to the view?
The second parameter to a can.view call is the data you want to pass to the template. Then within your template, you use that data to build the desired HTML. If the data you pass in is observable...
View ArticleRe : Firefox: TypeError: steal.dev is undefined
It turns out the same error is happening in other browsers, but looks different:Unable to get property 'warn' of undefined or null referenceI'm in development mode, explicitly setting "env" to...
View ArticleQuestion about binding in Observe List.
Hi.i have this scenario:A = can.Control({},{ items: [], 'init': { this.items = can.Observe.List([]); this.items.attr(getFromSomewhereAListOfObjects); this.b =...
View ArticleRe : Question about binding in Observe List.
You need to share the same instance of can.Observe list between your controls. The easiest way is passing them as options:'init': { this.items = can.Observe.List([]);...
View ArticleRe : production.js won't load. Debugging?
Let me narrow it down.My main script has: steal('file', 'file', file', function() { // this is never called in production.js}What could be the cause for this to happen?
View ArticleWhen .Json file is created ?
in below code, when '/services/recipes/'+params.id+'.json' file is create and how this contains the data.$.Model('recipe',{findOne : function(params, success, error ){ return $.ajax({ url:...
View ArticleRe : When .Json file is created ?
Short answer: jQueryMX does not create this file, it either has to be present already or the request is handled by the server-side code.There are two common cases for using the .json in a REST API.1)...
View ArticleRe : steal/build produces an empty production.js file
Curtis, any suggestions on why this is happening?
View ArticleRe : steal/build produces an empty production.js file
When you are using any dependency management solution, things start to get hairy when you load files outside of the loader.I would start by creating a main JS file that serves as the entry point for...
View ArticleRe : steal/build produces an empty production.js file
So I created a main JS file just like you said, but now when I steal the mootools file my application stops working. (complains that it doesn't understand the mootools functions). If I don't steal the...
View ArticleRe : steal/build produces an empty production.js file
Mootools (like jQuery) requires a shim entry in stealconfig.js. Take a look at the stealconfig.js in JMVC for an example of how to setup a shim.
View ArticleRe : When .Json file is created ?
Thanks Curtis.you mean we have to code to generate .JSON file on the server?
View ArticleRe : When .Json file is created ?
I mean jQueryMX is only concerned with making the Ajax request. What happens once that request hits the server is up to the back end code.
View Articlecan.Model file upload with XMLHttpRequest2 upload
What would be the preferred method to implement a file upload via ajax with can.Model? I believe you need access to the xhr object prior to sending the request.
View ArticleModel and many to many relationships
Hello, I am new to JavascriptMVC. I would like to model Many to Many relationships, and one to many relationships, where an instance 'belongs' to another instance of a different type. I also would...
View ArticleRe : Model and many to many relationships
Check out the attributes pluginhttp://donejs.com/docs.html#!can.Observe.attributes
View ArticleRe : Steal Build Error
I haven't. Envjs is over two years old at this point, so I would just make this change if it has no adverse effects. We are moving Steal to a node build system so the days of dealing with Java, Rhino,...
View ArticleRe : Steal Build Error
Thanks Double C!Keep us posted on this new node build system process.
View ArticleRe : can.Model file upload with XMLHttpRequest2 upload
I'm just using the jquery ajax file upload plugin from within my can.Control. This leaves me with my own model.save implementation, though.I need to fake triggering a model.create() so that my model...
View Article