The short answer is that you cannot. Controllers are created by the container before the route has the ability to install the model on the controller. If this object controller is the controller configured for you by Ember, you will not be able to access the model during initialization. Try checking the model property instead.
I cannot find the documentation in the manuals, so I will link you to the source code . If you read the source for the setup function, you will see that generateController() is called, and then setupController() is called after a while. Essentially, the controller is created, Ember does some work, then the model is installed. Ember does not set the model for the controller at creation.
Gjk
source share