I was previously working with Ember.StateManager
and now I\'m doing some tests before I finally switch to Ember.Router
, but I\'m failing to underst
The binding doesn't work because "the array is mutating, but the property itself is not changing". https://stackoverflow.com/a/10355003/603636
Using App.initialize and Ember.Router, views and controllers are now being automagically connected. There is very little reason to manually bind contacts in your view to the controller's content as you already have access to it.
Change your view's template to include:
{{#if controller.isLoaded}} // set this true in your ajax success function
{{#each contact in controller}}
{{view App.ContactListItemView contactBinding="contact"}}
{/each}}
{{else}}
<tr>
<td colspan="2">
You have no contacts <br />
:(
<td>
</tr>
{{/if}}