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

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

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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());
9 8
10 class DirectiveRef { 9 class DirectiveRef {
11 final dom.Node element; 10 final dom.Node element;
12 final Type type; 11 final Type type;
13 final NgAnnotation annotation; 12 final NgAnnotation annotation;
14 final String value; 13 final String value;
15 final List<ApplyMapping> mappings = new List<ApplyMapping>(); 14 final List<ApplyMapping> mappings = new List<ApplyMapping>();
16 15
17 BlockFactory blockFactory; 16 BlockFactory blockFactory;
18 17
19 DirectiveRef(this.element, this.type, this.annotation, [ this.value ]); 18 DirectiveRef(this.element, this.type, this.annotation, [ this.value ]);
20 19
21 String toString() { 20 String toString() {
22 var html = element is dom.Element ? (element as dom.Element).outerHtml : ele ment.nodeValue; 21 var html = element is dom.Element ? (element as dom.Element).outerHtml : ele ment.nodeValue;
23 return '{ element: $html, selector: ${annotation.selector}, value: $value, t ype: $type }'; 22 return '{ element: $html, selector: ${annotation.selector}, value: $value }' ;
24 } 23 }
25 } 24 }
26 25
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