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:
@ -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}.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user