blueFast
blueFast

Reputation: 44401

Problems accessing length property in array

In this jsbin this is not getting updated:

<span class="badge">{{controllers.nodesIndex.length}} records</span>

In the nodes template, but this is working:

<h2>Nodes list: {{this.length}}</h2>

In the nodes/index template. What is wrong with {{controllers.nodesIndex.length}}?

Upvotes: 1

Views: 36

Answers (1)

selvagsz
selvagsz

Reputation: 3872

You missed putting 'needs' in your NodesController

App.NodesController = Ember.ArrayController.extend({
  needs: ['nodesIndex']
});

Updated jsbin

Upvotes: 3

Related Questions