diff --git a/03-1-directives.html b/03-1-directives.html index 288394c..3a60e2b 100644 --- a/03-1-directives.html +++ b/03-1-directives.html @@ -13,17 +13,28 @@ var app = angular.module("myApp", []); app.directive("calculator", function(){ return { - restrict : "E", + restrict : "E",//E for element template:"" }; }); + + app.directive("leak", function(){ + return { + restrict:"A",//A for attribute + link:function(){ + alert("spray!"); + } + } + });

- + +
\ No newline at end of file