-
-
Save alexdiliberto/9948140 to your computer and use it in GitHub Desktop.
// NOTE: `AppName` is simply your PascalCase application name (`modulePrefix` key from `../config/environment.js`) | |
window.AppName.__container__.lookup('service:router')._router._routerMicrolib.recognizer.names; |
I get "Cannot read property 'views' of undefined"
Looks like there's an Ember.ViewUtils
... but no Ember.View
In Ember 3.4, at least, you can do this, as mentioned here:
router = YourApplicationName.__container__.lookup('service:router');
router._router._routerMicrolib.recognizer.names;
But using the Ember Inspector makes this much easier!
@backspace Thanks, yea this is a 5 year old gist...I updated it 👍
I can't get my application name to be recognised ... very strange ... anyway expanding on what backspace said here's another approach which steps around that problem (works in Ember Inspector 3.11.0).
-
Use Ember Inspector and select 'Container',
-
select 'route',
-
click on $E at top of Container types list
-
Enter '$E.router._routerMicrolib.recognizer.names;' into console.
Do you have ember-export-application-global
? It’s turned off by default in a production environment.
I get: Ember is undefined