forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-guide-3.html
More file actions
18 lines (18 loc) · 870 Bytes
/
dev-guide-3.html
File metadata and controls
18 lines (18 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!-- Adapted from the AngularJS Developer Guide (https://docs.angularjs.org/guide),
which is licensed under the MIT license; see file LICENSE in parent directory. -->
<div ng-controller="EventController">
Root scope <tt>MyEvent</tt> count: {{count}}
<ul>
<li ng-repeat="i in [1]" ng-controller="EventController"> <!-- ScopeProperty -->
<button ng-click="$emit('MyEvent')">$emit('MyEvent')</button> <!-- RootScopeProperty -->
<button ng-click="$broadcast('MyEvent')">$broadcast('MyEvent')</button> <!-- RootScopeProperty -->
<br>
Middle scope <tt>MyEvent</tt> count: {{count}} <!-- ScopeProperty -->
<ul>
<li ng-repeat="item in [1, 2]" ng-controller="EventController"> <!-- ScopeProperty -->
Leaf scope <tt>MyEvent</tt> count: {{count}} <!-- ScopeProperty -->
</li>
</ul>
</li>
</ul>
</div>