Hi there I have this \"confirmable\" button directive which I am working on,
The html code that will trigger the directive \'confirmable\'
If you manipulate the DOM in the link stage and want to add angular logic to its element(s) it's required to compile the effected element(s). Let angular inject $compile
and invoke it after you have finished processing the DOM and added your ng-*
directives.
function MyDirective($compile)
{
return {
restrict: "AE",
templateUrl: "/path",
link: (scope, element, attributes) =>
{
// Add your directives
$compile(element.contents())(scope);
}
};
}