angularjs - Passing id and as a parameter to directive -
I have an instruction, if the ID has not been passed, then generate it one But it seems that the generation is slow to slow down and that the ID is not present in the instruction {function (angular) {'hard use';; angular.module (' WidgetsModule ') .directive (' myDirective ', [function] {function postLink (scope, jqElm, attr) {} function postCompile (Telement, tAttrs) {return function postLink (scope, jqElm, attr) {attr. Inspection ("id", function (id) {// init scope.id = id Called on == Undefined ID: 'some1';});}} function Ctrl (scope) {} {return template: ' ' + ' & Lt; / div & gt; ', Controller: [' $ scope ', Ctrl], Replace: Correct, scope: {ID:' @ '}, Restrict:' AC ', link: Post link, compile : PostCompile};}]);}} (Window.angular) I think Is that id is special because it has a valid dom feature in my case id also in the form of an attribute for HTML Insect was going, not that...