You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
547 B
JavaScript
23 lines
547 B
JavaScript
// Service for running code in the context of the application being debugged
|
|
angular.module('panelApp').factory('appWatch', function (chromeExtension) {
|
|
|
|
var _watchCache = {};
|
|
|
|
// Public API
|
|
// ==========
|
|
return {
|
|
|
|
getWatchTree: function (id, callback) {
|
|
chromeExtension.eval("function (window, args) {" +
|
|
"return window.__ngDebug.getWatchTree(args.id);" +
|
|
"}", {id: id}, function (tree) {
|
|
if (tree) {
|
|
_watchCache[id] = tree;
|
|
}
|
|
callback(_watchCache[id]);
|
|
});
|
|
}
|
|
|
|
};
|
|
});
|