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

Side by Side Diff: third_party/pkg/angular/lib/formatter/arrayify.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 angular.formatter_internal;
2
3 /**
4 * Given a Map, returns a list of items which have `key` and `value` property.
5 *
6 * Usage:
7 *
8 * <div ng-repeat="item in {'key1': 'value1', 'key2':'value2'} | arrayify">
9 * {{item.key}}: {{item.value}}
10 * </div>
11 */
12 @Formatter(name:'arrayify')
13 class Arrayify implements Function {
14 List<_KeyValue> call(Map inputMap) {
15 if (inputMap == null) return null;
16 List<_KeyValue> result = [];
17 inputMap.forEach((k, v) => result.add(new _KeyValue(k, v)));
18 return result;
19 }
20 }
21
22 class _KeyValue<K, V> {
23 K key;
24 V value;
25
26 _KeyValue(this.key, this.value);
27 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/filter/uppercase.dart ('k') | third_party/pkg/angular/lib/formatter/currency.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698