A couple of things.
First, remember that controllers are singletons. So your init
function will only fire once for the entire lifecycle of your application (which probably isn't what you want). But that doesn't really matter, since...
The way that you're handling models isn't the way that Ember.js is set up for. You shouldn't be fetching models in controllers, only routes. That's why there is no store
property on the controller. You need to implement the model
hook on your route, like this:
App.CategoriesRoute = Ember.Route.extend({
model: function() {
return this.store.find('category');
}
});
From there, Ember will automatically set the model
property (not the content
property, don't use that) on your controller to the data that you return from the model
hook.
So, just eliminate the content
property and init
function from your controller, and implement that hook in your model, and you should be good to go.