Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: third_party/pkg/angular/example/web/animation/stress_demo.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 part of animation;
2
3 @Component(
4 selector: 'stress-demo',
5 template: '''
6 <div class="stress-demo">
7 <button ng-click="ctrl.visible = !ctrl.visible">
8 Toggle Visibility</button>
9 <div>
10 <div class="stress-box" ng-repeat="number in ctrl.numbers"></div>
11 </div>
12 </div>
13 ''',
14 publishAs: 'ctrl',
15 applyAuthorStyles: true)
16 class StressDemo {
17 bool _visible = true;
18 final numbers = <int>[1, 2];
19
20 // When visibility changes add or remove a large chunk of elements.
21 void set visible(bool value) {
22 if (value) {
23 for (int i = 0; i < 200; i++) {
24 numbers.add(i);
25 }
26 } else {
27 numbers.clear();
28 }
29 _visible = value;
30 }
31
32 bool get visible => _visible;
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698