Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Ember Inspector get the data from the app?

I'm looking into building a Chrome extension which can be used alongside with Ember Inspector and provide app specific information, settings for my own use cases.

I tried different ways of accessing the app instance, but with our build, it is not exposed globally, and I don't intend to do that. However, Ember Inspector can still see the app, controllers, routes etc. and I'm wondering how it does it. I've been looking into the source code of the inspector but no luck finding what I'm looking for. Does anyone have some insight maybe how it works? I'm using Ember 1.13.

like image 989
xjmdoo Avatar asked Jan 12 '17 18:01

xjmdoo


People also ask

How do you use an Ember inspector?

You can install the Ember inspector to debug your application. The Ember inspector allows interacting with the Ember objects. The view tree provides the current state of an application. You can see the list of application's routes defined by the inspector and the Data tab is used to display the list of model types.

Is Ember a backend?

It should also be mentioned that Ember is purely a frontend framework. It has a number of ways of interacting with the backend of your choice, but this backend is not in any way handled by Ember itself.

What is the purpose of Ember?

Ember. js is an open source, free JavaScript client-side framework used for developing web applications. It allows building client side JavaScript applications by providing a complete solution which contains data management and an application flow. The original name of Ember.

Is Ember a frontend?

js vs React is an interesting comparison. Both are popular JavaScript frameworks that are best used for frontend development and for creating attractive user interfaces. The developer community has been highly pleased with these technologies.


1 Answers

After more research I found the solution: There is an array Ember.Namespace.NAMESPACES, after checking which element is the instance of Ember.Application we can use that to access the application instance.

like image 122
xjmdoo Avatar answered Oct 29 '22 09:10

xjmdoo