How to make use of Application (parent) routes within in-repo and other Ember Engines?

I know we have to share the routes that we want to make use of in the engine from parent via externalRoutes dependency. But my question is how to make use of that within the engine. When I tried to pass the routes from parent application to the engine what I saw when tried to transition to the route from engine is that no such route found in the engine.

Error: Assertion Failed: The route in-app-blog.large-company-site.home was not found

Here the large-company-site is the parent application and home is the route that I am trying to send from the parent application.

In an engine you can transition to a route in two ways:

  • transitionTo: transitions to a route within the engine
  • transitionToExternal: transitions to a parent route that has been defined in the engine config (“home” in your case). The name is a clear signal that you are transitioning to a route that is not in the engine that must be provided by the consuming application. So instead of this.transitionTo('large-company-site.home') i believe you’d want this.transitionToExternal('home')

Same deal with link components: you have <LinkTo ... /> and <LinkToExternal />