Last active
August 29, 2015 13:59
-
-
Save THuRStoN/10461917 to your computer and use it in GitHub Desktop.
Inspecting in Ember Applications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/aexmachina/ember-debug | |
| Em.inspect && Em.keys | |
| App.__container__.lookup | |
| Em.View.views[ 'ember605' ] | |
| Em.keys(Em.TEMPLATES).forEach(function(t){console.log(t)}) | |
| App.debug.controller( 'albums' ); | |
| App.__container__.lookup( 'controller:albums' ); | |
| var initializer = { | |
| name: 'debug', | |
| initialize:function (container, app) { | |
| app.debug = { | |
| controller: function(name){ | |
| return container.lookup("controller:" + name); | |
| }, | |
| route: function(name){ | |
| return container.lookup("route:" + name); | |
| }, | |
| view: function(domElem){ | |
| return Em.View.views[domElem]; | |
| }, | |
| registry: container.registry.dict, | |
| routes: Em.keys(app.Router.router.recognizer.names), | |
| store: container.lookup("store:main"), | |
| typeMaps: container.lookup("store:main").typeMaps, | |
| templates: Em.keys(Ember.TEMPLATES), | |
| inspect: Em.inspect, | |
| observersFor: function(observedObj, key){ | |
| Em.observersFor(observedObj, key); | |
| } | |
| }; | |
| } | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment