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
9 scope
11 link
12 require
14 compile
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #