-
Notifications
You must be signed in to change notification settings - Fork 77
support multiple ng apps #5
Comments
Good point. This should be supported. You can use the directive and it should work fine, but for the graph what kind of api would you prefer? Currently the api is: showAngularStats({
"position": "topleft",
"digestTimeThreshold": 16,
"autoload": false
}); How about: showAngularStats({
"element": document.querySelector('#my-ng-app1'),
"position": "topleft",
"digestTimeThreshold": 16,
"autoload": false
}); Would you ever want to have more than one graph on a page? In this case, I imagine it should be labeled somehow. Open to ideas of what kind of an api would work well for what you're trying to accomplish :-) |
yeah maybe allow multiple calls to showAngularStats(), so you can see many graphs at once. I like the idea of passing in the element, that would do the trick. |
I'm not used to having multiple ng-apps on a page. Just confirming, they have totally separate $rootScopes and (hence) digest cycles right? Otherwise calculating the average digest cycle length could be a problem. |
yep separate |
I think this should be very easy. I'll let you know soon! |
Hmmm... What am I doing wrong here @geddski? http://jsbin.com/zerez/2/edit |
@kentcdodds something like this? http://jsbin.com/fucevaxuyu/2/edit |
Awesome. Thanks @shedar. |
This is going to require more work than I thought because ng-stats is a singleton that holds a bunch of state for performance reasons. I'll have to give some thought into restructuring it a bit... |
in the case where you have multiple Angular apps on the page at once, like angularjs.org or when using overmind it would be sweet to be able to see the stats for all the apps.
The text was updated successfully, but these errors were encountered: