Loading routes in routable engine don't work
See original GitHub issueLoading subroutes are not working for me in a routeable engine.
My setup: ember@2.8.0 ember-engines@0.3.0 ember-cli@2.7.0
My engine is setup as an in-repo routeable engine. Basically, it seems that all loading subroutes simply aren’t ever entered. Instead, it always falls back to the host apps loading routes.
Steps to reproduce:
ember g route test-subroutes -ir=my-engine
ember g route test-subroutes-loading -ir=my-engine
ember g route loading -ir=my-engine
// lib/my-engine/addon/test-subroutes/route.js
beforeModel() {
return new Ember.RSVP.Promise((resolve) => {
Ember.run.later(this, resolve, 5000);
});
}
{{! lib/my-engine/addon/loading/template.hbs}}
{{! & lib/my-engine/addon/test-subroutes-loading/template.hbs }}
{{log 'engine loading'}}
Basically, the log from the loading templates is never reached. Instead, when looking at the Ember Inspector, I see that while loading, the current route is application.loading.
My host-apps router:
Router.map(function() {
this.mount('my-engine', { as: 'my-engine' });
});
My engines router:
export default buildRoutes(function() {
this.route('test-subroutes');
});
( I left out other routes from my app, but I don’t think they should have any impact on this?)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Nested routes in ember engine routes.js? - Stack Overflow
Its not rendering the content for comments template. But it doesn't show any error either. ember.js · ember-engines.
Read more >ember-engines - npm
Routable engines which can be mounted at specific routes in a routing map, and which can contain routes of their own. Route-less engines,...
Read more >Route Created on Computer Not Following Road or Trail on ...
If it is a non-mapping device, it will not support automatic routing as it does not support mapping products. · If the device...
Read more >Pros & Cons Of Ember Engines - Medium
When I started working on our team's massive Ember app with more ... The rest of the Engine can be loaded when a...
Read more >Composability System · Backstage Software Catalog and ...
Routable extensions even enforce lazy loading, as it is the only way to provide a component: ... For example, the following app code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is great! I’m running ember beta & ember-engines 0.4.2 and it’s working perfectly. Thanks for that, that was the only remaining major pain point with engines for us.
This should be fixed once https://github.com/dgeb/ember-engines/pull/246 and https://github.com/emberjs/ember.js/pull/14545 land. This was honestly, stupidly hard to fix lol.