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

Unified Diff: third_party/pkg/angular/example/web/animation/repeat_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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/example/web/animation/repeat_demo.dart
diff --git a/third_party/pkg/angular/example/web/animation/repeat_demo.dart b/third_party/pkg/angular/example/web/animation/repeat_demo.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5857d72fe808751d9f480356f0b0afbeb0d781ba
--- /dev/null
+++ b/third_party/pkg/angular/example/web/animation/repeat_demo.dart
@@ -0,0 +1,32 @@
+part of animation;
+
+@Component(
+ selector: 'repeat-demo',
+ template: '''
+ <div class="repeat-demo">
+ <button ng-click="ctrl.addItem()">Add Thing</button>
+ <button ng-click="ctrl.removeItem()">Remove Thing
+ </button>
+ <ul>
+ <li ng-repeat="outer in ctrl.items">
+ <ul>
+ <li ng-repeat="inner in ctrl.items">{{inner}}</li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ ''',
+ publishAs: 'ctrl',
+ applyAuthorStyles: true)
+class RepeatDemo {
+ var thing = 0;
+ final items = [];
+
+ void addItem() {
+ items.add("Thing ${thing++}");
+ }
+
+ void removeItem() {
+ if (items.isNotEmpty) items.removeLast();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698