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

Side by Side Diff: third_party/pkg/angular/lib/core_dom/common.dart

Issue 180873006: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback Created 6 years, 9 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
1 part of angular.core.dom; 1 part of angular.core.dom;
2 2
3 List<dom.Node> cloneElements(elements) { 3 List<dom.Node> cloneElements(elements) {
4 return elements.map((el) => el.clone(true)).toList(); 4 return elements.map((el) => el.clone(true)).toList();
5 } 5 }
6 6
7 typedef ApplyMapping(NodeAttrs attrs, Scope scope, Object dst); 7 typedef ApplyMapping(NodeAttrs attrs, Scope scope, Object dst,
8 FilterMap filters, notify());
8 9
9 class DirectiveRef { 10 class DirectiveRef {
10 final dom.Node element; 11 final dom.Node element;
11 final Type type; 12 final Type type;
12 final NgAnnotation annotation; 13 final NgAnnotation annotation;
13 final String value; 14 final String value;
14 final List<ApplyMapping> mappings = new List<ApplyMapping>(); 15 final List<ApplyMapping> mappings = new List<ApplyMapping>();
15 16
16 BlockFactory blockFactory; 17 BlockFactory blockFactory;
17 18
18 DirectiveRef(this.element, this.type, this.annotation, [ this.value ]); 19 DirectiveRef(this.element, this.type, this.annotation, [ this.value ]);
19 20
20 String toString() { 21 String toString() {
21 var html = element is dom.Element ? (element as dom.Element).outerHtml : ele ment.nodeValue; 22 var html = element is dom.Element ? (element as dom.Element).outerHtml : ele ment.nodeValue;
22 return '{ element: $html, selector: ${annotation.selector}, value: $value }' ; 23 return '{ element: $html, selector: ${annotation.selector}, value: $value, t ype: $type }';
23 } 24 }
24 } 25 }
25 26
27 /**
28 * Creates a child injector that allows loading new directives, filters and
29 * services from the provided modules.
30 */
31 Injector forceNewDirectivesAndFilters(Injector injector, List<Module> modules) {
32 modules.add(new Module()..factory(Scope, (i) {
33 var scope = i.parent.get(Scope);
34 return scope.createChild(new PrototypeMap(scope.context));
35 }));
36 return injector.createChild(modules,
37 forceNewInstances: [DirectiveMap, FilterMap]);
38 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/core_dom/block_factory.dart ('k') | third_party/pkg/angular/lib/core_dom/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698