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

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

Issue 256553002: Revert "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
1 part of angular.core.dom_internal; 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 class MappingParts { 7 typedef ApplyMapping(NodeAttrs attrs, Scope scope, Object dst,
8 final String attrName; 8 FilterMap filters, notify());
9 final String mode;
10 final String dstExpression;
11 final String originalValue;
12
13 const MappingParts(this.attrName, this.mode, this.dstExpression, this.original Value);
14 }
15 9
16 class DirectiveRef { 10 class DirectiveRef {
17 final dom.Node element; 11 final dom.Node element;
18 final Type type; 12 final Type type;
19 final Directive annotation; 13 final NgAnnotation annotation;
20 final String value; 14 final String value;
21 final mappings = new List<MappingParts>(); 15 final List<ApplyMapping> mappings = new List<ApplyMapping>();
16
17 BlockFactory blockFactory;
22 18
23 DirectiveRef(this.element, this.type, this.annotation, [ this.value ]); 19 DirectiveRef(this.element, this.type, this.annotation, [ this.value ]);
24 20
25 String toString() { 21 String toString() {
26 var html = element is dom.Element 22 var html = element is dom.Element ? (element as dom.Element).outerHtml : ele ment.nodeValue;
27 ? (element as dom.Element).outerHtml 23 return '{ element: $html, selector: ${annotation.selector}, value: $value, t ype: $type }';
28 : element.nodeValue;
29 return '{ element: $html, selector: ${annotation.selector}, value: $value, '
30 'type: $type }';
31 } 24 }
32 } 25 }
33 26
34 /** 27 /**
35 * Creates a child injector that allows loading new directives, formatters and 28 * Creates a child injector that allows loading new directives, filters and
36 * services from the provided modules. 29 * services from the provided modules.
37 */ 30 */
38 Injector forceNewDirectivesAndFilters(Injector injector, List<Module> modules) { 31 Injector forceNewDirectivesAndFilters(Injector injector, List<Module> modules) {
39 modules.add(new Module() 32 modules.add(new Module()..factory(Scope, (i) {
40 ..factory(Scope, (i) { 33 var scope = i.parent.get(Scope);
41 var scope = i.parent.get(Scope); 34 return scope.createChild(new PrototypeMap(scope.context));
42 return scope.createChild(new PrototypeMap(scope.context)); 35 }));
43 }));
44
45 return injector.createChild(modules, 36 return injector.createChild(modules,
46 forceNewInstances: [DirectiveMap, FormatterMap]); 37 forceNewInstances: [DirectiveMap, FilterMap]);
47 } 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