Since this.resource
is going to be deprecated, how are loading and error routes handled/generated in Ember 2.0?
As I see, nothing has changed with routes - Loading / Error Substates - Routing - Ember Guides
True, but defining a route in the router does not generate loading
and error
substates. Do I need to do this manually from now on?
@Eptis I believe it does if you include the template, controller or router.
The loading/error states are generated for .route()
's so long as there is a nested function (usually for sub-routes). Ex:
this.route('foo'); // no loading/error
this.route('bar', function(){ // YES loading/error
this.route('baz'); // no loading/error
});
this.route('foobarbaz', function(){}); // YES loading/error
The last I heard, there was discussion about just making those sub-state routes for every route, but that was some time ago.
1 Like
Thanks @Panman8201for clearing this up