I’m trying to use “needs” in an ember component but getting the error "Property set failed: object in path "controllers.categoryManager" could not be found or was destroyed."
A sample of problem can be found on JSBIN, Ember Starter Kit, Is it that we cannot use “needs” in components ?
Part of code:
App.CategoryManagerController = Ember.Controller.extend({
selectedCategory: null,
});
App.BlogPostComponent = Ember.Component.extend({
needs: ['categoryManager'],
selectedCategory: Ember.computed.alias('controllers.categoryManager.selectedCategory'),
actions:{
selectedCategory: function (){
this.set('selectedCategory',1);
}
}
});