These two are defined for different ember objects - the model on the controller and the modelFor method on the route.
First of all, the model property and executing it as this.get('model') receives only the object that is already set in the model property in the controller. This means that it gets everything that was created during the setupController hook in the path. You cannot receive data from the API using this operator. In addition, it allows you to get only the object installed on the current controller ( this area).
When is it set up?
In setupController hook. The route life cycle first resolves all model-related beforeModel ( beforeModel , model and afterModel ). After that, it executes setupController with these arguments: (controller, model) . This means that it has access to everything that is allowed with the model hook and the current controller instance. By default, setupController sets the model on controller.model property:
controller.set('model', model);
You can override this with your custom code and, for example, set your model in the myModel property - it is up to you. But if you want to get your model in your controller code, you should always request the property on which you set your model.
How does #modelFor work?
modelFor defined in instances of routes and allows you to get the result of model binding from any route in your application. You can use it in your setupController hook as follows:
controller.set('model', this.modelFor('myOtherRoute'));
This behavior can be seen as an improvement in consistency in the application - it clearly says that in the current route and controller you use the same data as in myOtherRoute .
How it works? It requests the myOtherRoute.model property, which stores the model data of the allowed route. The implementation is quite simple - it looks for your container (a global object that stores your routes, controllers, components, etc.) for the route named myOtherRoute and gets its model property.