We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 403aad1 commit 552ae91Copy full SHA for 552ae91
03-1-directives.html
@@ -26,12 +26,22 @@
26
}
27
28
});
29
+
30
+ app.directive("calculus", function(){
31
+ return {
32
+ restrict:"C",//C for class
33
+ link:function(){
34
+ alert("lets do some integration!")
35
+ }
36
37
+ });
38
</script>
39
40
</head>
41
<body ng-app="myApp">
42
<div id="wrapper">
- <calculator></calculator><br />
43
+ <!--Here we give one of our calculators the calculus class.-->
44
+ <calculator class="calculus"></calculator><br />
45
<!--Here we give our calculator attribute the leak attribute which executes the linking function.
46
We could have just as well added the attribute to any other element-->
47
<calculator leak></calculator>
0 commit comments