I'm trying to write a complicated app in SC2. There's no editing component yet, just a display of (lots of data). Starting from the Todos & Handlebars guides, here's some of the stuff I've had to google for, or wasn't readily obvious.
Note: I like coffeescript and haml
-
Why is there sometimes references to
SC.ArrayController
?- Colin C: it was gone but its back now. we need to generate the docs again.
-
Why is
App.fooController
anSC.Object
, andApp.foosController
anSC.ArrayProxy
? Shouldn't there just be a genericSC.Controller
, orSC.CollectionController
, if the behavior is different? -
How do I nest controllers? Eg,
BlogApp.postsController
andBlogApp.commentsController
, where I want to display several posts and their comments on the page?- How do I organize the view templates? What do I say in the post template where I want the comments to go?
-
If I follow the handlebars guide, and put
<script type="text/x-handlebars" ...>
in the<head>
, how do I specify where to put the rendered result? Eg, if I have a div#content, how do I tell SC I want the template rendered there?