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

Unified Diff: third_party/pkg/angular/lib/core/directive.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « third_party/pkg/angular/lib/bootstrap.dart ('k') | third_party/pkg/angular/lib/core/filter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/angular/lib/core/directive.dart
diff --git a/third_party/pkg/angular/lib/core/directive.dart b/third_party/pkg/angular/lib/core/directive.dart
index 3118b2c865d6324391f60229c6a54045128df570..e88db4aa970181b85cd1b4078c9ecd4075e17f4e 100644
--- a/third_party/pkg/angular/lib/core/directive.dart
+++ b/third_party/pkg/angular/lib/core/directive.dart
@@ -245,18 +245,19 @@ class NgComponent extends NgAnnotation {
NgAnnotation cloneWithNewMap(newMap) =>
new NgComponent(
- template: this.template,
- templateUrl: this.templateUrl,
- cssUrls: this.cssUrls,
- applyAuthorStyles: this.applyAuthorStyles,
- resetStyleInheritance: this.resetStyleInheritance,
- publishAs: this.publishAs,
+ template: template,
+ templateUrl: templateUrl,
+ cssUrl: cssUrl,
+ cssUrls: cssUrls,
+ applyAuthorStyles: applyAuthorStyles,
+ resetStyleInheritance: resetStyleInheritance,
+ publishAs: publishAs,
map: newMap,
- selector: this.selector,
- visibility: this.visibility,
- publishTypes: this.publishTypes,
- exportExpressions: this.exportExpressions,
- exportExpressionAttrs: this.exportExpressionAttrs);
+ selector: selector,
+ visibility: visibility,
+ publishTypes: publishTypes,
+ exportExpressions: exportExpressions,
+ exportExpressionAttrs: exportExpressionAttrs);
}
RegExp _ATTR_NAME = new RegExp(r'\[([^\]]+)\]$');
@@ -295,20 +296,20 @@ class NgDirective extends NgAnnotation {
NgAnnotation cloneWithNewMap(newMap) =>
new NgDirective(
- children: this.children,
- publishAs: this.publishAs,
+ children: children,
+ publishAs: publishAs,
map: newMap,
- selector: this.selector,
- visibility: this.visibility,
- publishTypes: this.publishTypes,
- exportExpressions: this.exportExpressions,
- exportExpressionAttrs: this.exportExpressionAttrs);
+ selector: selector,
+ visibility: visibility,
+ publishTypes: publishTypes,
+ exportExpressions: exportExpressions,
+ exportExpressionAttrs: exportExpressionAttrs);
}
/**
* Meta-data marker placed on a class which should act as a controller for your application.
*
- * Controllers are essentially [NgDirectives] with few key differences:
+ * Controllers are essentially [NgDirective]s with few key differences:
*
* * Controllers create a new scope at the element.
* * Controllers should not do any DOM manipulation.
@@ -342,14 +343,14 @@ class NgController extends NgDirective {
NgAnnotation cloneWithNewMap(newMap) =>
new NgController(
- children: this.children,
- publishAs: this.publishAs,
+ children: children,
+ publishAs: publishAs,
map: newMap,
- selector: this.selector,
- visibility: this.visibility,
- publishTypes: this.publishTypes,
- exportExpressions: this.exportExpressions,
- exportExpressionAttrs: this.exportExpressionAttrs);
+ selector: selector,
+ visibility: visibility,
+ publishTypes: publishTypes,
+ exportExpressions: exportExpressions,
+ exportExpressionAttrs: exportExpressionAttrs);
}
abstract class AttrFieldAnnotation {
@@ -432,11 +433,11 @@ abstract class NgDetachAware {
}
@NgInjectableService()
-class DirectiveMap extends AnnotationMap<NgAnnotation> {
+class DirectiveMap extends AnnotationsMap<NgAnnotation> {
DirectiveMap(Injector injector, MetadataExtractor metadataExtractor,
FieldMetadataExtractor fieldMetadataExtractor)
: super(injector, metadataExtractor) {
- Map<NgAnnotation, Type> directives = {};
+ Map<NgAnnotation, List<Type>> directives = {};
forEach((NgAnnotation annotation, Type type) {
var match;
var fieldMetadata = fieldMetadataExtractor(type);
@@ -452,7 +453,7 @@ class DirectiveMap extends AnnotationMap<NgAnnotation> {
});
annotation = annotation.cloneWithNewMap(newMap);
}
- directives[annotation] = type;
+ directives.putIfAbsent(annotation, () => []).add(type);
});
_map.clear();
_map.addAll(directives);
« no previous file with comments | « third_party/pkg/angular/lib/bootstrap.dart ('k') | third_party/pkg/angular/lib/core/filter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698