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

Re : How do you connect the model to the view?

$
0
0
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 (can.Observe, can.Observe.List, can.compute) then you can use live binding to keep your HTML in synch with changes to the data.

The docs for can.view are here
Some examples of live binding are here

Viewing all articles
Browse latest Browse all 3491

Trending Articles