replace

We can discard the original element, where the directive was attached, replacing it by the directive's template. This can be done by enabling the replace property:

directives.js
parking.directive("alert", function() {
return {
templateUrl: "alert.html",
replace: true
};
});
The following code is the compiled directive without the original element.
snippet
<div class="alert" alert="">
<span class="alert-topic">
Something went wrong!
</span>
<span class="alert-description">
You must inform the plate and the color of the car!
</span>
</div>
Related Tutorial
7. replace

9. scope
11. link
12. require
14. compile
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 # # # # #