OLD | NEW |
(Empty) | |
| 1 part of animation; |
| 2 |
| 3 @Component( |
| 4 selector: 'visibility-demo', |
| 5 template: ''' |
| 6 <div class="visibility-demo"> |
| 7 <button ng-click="ctrl.visible = !ctrl.visible">Toggle Visibility</button> |
| 8 <div class="visible-if" ng-if="ctrl.visible"> |
| 9 <p>Hello World. ng-if will create and destroy |
| 10 dom elements each time you toggle me.</p> |
| 11 </div> |
| 12 <div class="visible-hide" ng-hide="ctrl.visible"> |
| 13 <p>Hello World. ng-hide will add and remove |
| 14 the .ng-hide class from me to show and |
| 15 hide this view of text.</p> |
| 16 </div> |
| 17 </div> |
| 18 ''', |
| 19 publishAs: 'ctrl', |
| 20 applyAuthorStyles: true) |
| 21 class VisibilityDemo { |
| 22 bool visible = false; |
| 23 } |
OLD | NEW |