templateUrl

There is another way to achieve the same goal with more quality. We just need to move the HTML snippet to an isolated file and bind it using the templateUrl property, as shown in the following code snippet:

index.html
<div alert></div>
directives.js
parking.directive("alert", function () {
return {
templateUrl: "alert.html"
});
alert.html
snippet
<div class="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 # # # # #