Where does Angular store directive templates?
I have a module/directive and I want to be able to get the template it uses in another directive. Specifically I want to view the raw HTML and the names of the scoped variables
Some Directive
var someModule = angular.module('someModule', []);
someModule.controller('someModuleCtrl', [ '$scope',
function ($scope) {
'use strict';
//Do stuff
};
}]);
someModule.directive('someModule', [
function () {
'use strict';
return {
restrict: 'AE',
template: ' some HTML and {{AngularVar}}',
scope: {
input1: '=',
input2: '=',
optional1: '=?'
},
controller: "someModuleCtrl"
};
}]);
Some other directive where I want to see the raw HTML of the other directive's tempalte
var myModule = angular.module('MyModule', []);
myModule.controller('MyModuleCtrl', ['$scope',
function ($scope) {
console.log(--------someModule.directives['someModule'].template---------);
}]);