Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You really don't need much of anything to get started with EmberJS. I've created a JSFiddle here: <a href="http://jsfiddle.net/nzXW9/" rel="nofollow">http://jsfiddle.net/nzXW9/</a> that highlights how simple a <em>simple</em> application can be. I've also created a superfluous <code>App.PetsCatsController</code> just to demonstrate how that automatically becomes the controller when you move into the <code>pets.cats</code> route.</p> <p>You don't need an <code>applicationController</code> or <code>applicationView</code> to get started. From the <code>pets.index</code> route, Ember assumes the following by default: <code>PetsIndexController</code>, <code>PetsIndexView</code>, <code>PetsIndexRoute</code>.</p> <p>From my understanding of EmberJS, let's take a simple example scenario (we don't have DS models at this stage) for when we move into the #/pets/cats route:</p> <ol> <li>If available, consult the <code>PetsCatsRoute</code> for instructions about moving into this route;</li> <li>Since Ember's controllers are singletons, check if we already have an instance of a <code>PetsCatsController</code>, if we do, go to #5, otherwise go to #3;</li> <li>Check if there is a user defined <code>PetsCatsController</code>, if there is create an instance of it;</li> <li>If there isn't a user defined <code>PetsCatsController</code>, instantiate an EmberJS generated <code>PetsCatsController</code> controller;</li> <li>Find the corresponding <code>PetsCatsView</code>, if it exists, otherwise generate one automatically.</li> </ol> <p>You'll notice as well from the JSFiddle, that you don't necessarily need to concern yourself with index routes, unless you need to as your project expands.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload