refactor(compiler): rename decorator directives into directive

BREAKING CHANGE:
Previously, `Directive` was the abstract base class of several directives.
Now, `Directive` is the former `Decorator`, and `Component` inherits from it.
This commit is contained in:
Tobias Bosch
2015-04-30 13:38:40 -07:00
parent c671706518
commit f75a50c1dd
71 changed files with 384 additions and 438 deletions

View File

@ -16,7 +16,7 @@ import 'rewriter.dart';
/// reflector.
///
/// This will also create .ng_deps.dart files for classes annotated
/// with @Component, @View, @Decorator, etc.
/// with @Component, @View, @Directive, etc.
///
/// This transformer is the first phase in a two-phase transform. It should
/// be followed by {@link DirectiveLinker}.

View File

@ -15,8 +15,8 @@ DirectiveMetadata readDirectiveMetadata(RegisteredType t) {
num _getDirectiveType(String annotationName) {
// TODO(kegluneq): Detect subtypes & implementations of `Directive`s.
switch (annotationName) {
case 'Decorator':
return DirectiveMetadata.DECORATOR_TYPE;
case 'Directive':
return DirectiveMetadata.DIRECTIVE_TYPE;
case 'Component':
return DirectiveMetadata.COMPONENT_TYPE;
default:
@ -101,7 +101,7 @@ class _DirectiveMetadataVisitor extends Object
if (compileChildrenValue is! BooleanLiteral) {
logger.error(
'Angular 2 currently only supports boolean literal values for '
'Decorator#compileChildren.'
'Directive#compileChildren.'
' Source: ${compileChildrenValue}');
return;
}