Open DinisCruz opened 8 years ago
here is the problem I was having (how to get the list of templates in $templateCache) http://stackoverflow.com/questions/31326614/how-do-i-list-everything-in-the-template-cache
accessing route params values (via angular DI)
el = document.querySelector('.ng-scope');
$app = angular.element(el);
$injector = $app.injector();
$get = $injector.get;
$rootScope = $app.scope();
$get('$routeParams')
getting $templateCache directly
$templateCache = angular.element(document.querySelector('.ng-scope'))
.injector().get('$templateCache')
here is one way to access the templateCache value data
1) add a variable with it to the Window object
_template_Cache = angular.element(document.querySelector('.ng-scope'))
.injector().get('$templateCache')
2) take a heap Snapshot:
3) find the Window object
4) inside it find the _templateCache field
5) inside it find the get
function , open the context
and look in the data field
is to set a break point of the getter and trigger a call to it
_template_Cache.get('abc')
for example:
get module
run code