Getting content from another controller via this.get("controllers.index.content")
or this.get("controllers.index.arrangedContent")
(for sorted content) doesn't work when using the ember-localstorage-adapter on the backend.
For example, getting content from another controller:
App.StartController = Ember.ObjectController.extend({
needs: 'index',
someFunction: function() {
// get the "content" from the IndexController
var names = this.get("controllers.index.arrangedContent");
alert(names.objectAt(0).name); // should display the name property from
first stored object(if there are any stored in local storage of course),
instead, it always returns "undefined"
}
});
What am I doing wrong here? Here's an example jsfiddle