Get Routable EngineInstance

Open
#3 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Domain
devtools

Research direction

Start at the EDB class and inspect the router:main lookup, _routerMicrolib.getRoute, and getOwner calls shown in the issue. Trace how a mount point resolves to an engine route; done means getEngineInstanceForRoute returns the corresponding EngineInstance for the requested mount point. The payload names no test file.

Written by the indexing model from the issue text.

Description

$edb.getEngineInstanceForRoute('some.mount.point') => Promise<EngineInstance>
class EDB {
  async getEngineInstanceForRoute(mountPoint: string): Promise<EngineInstance> {
    const router = this.owner.lookup('router:main');
    const engineApplicationRoute = await router._routerMicrolib.getRoute(mountPoint)
    const engineInstance = getOwner(engineApplicationRoute);
    return engineInstance;
  }
}
Dominant language
JavaScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emberjs/ember-debug

All issues in emberjs/ember-debug

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.