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:
4
modules/angular2/src/directives/class.js
vendored
4
modules/angular2/src/directives/class.js
vendored
@ -1,9 +1,9 @@
|
||||
import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
|
||||
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[class]',
|
||||
properties: {
|
||||
'iterableChanges': 'class | keyValDiff'
|
||||
|
4
modules/angular2/src/directives/for.js
vendored
4
modules/angular2/src/directives/for.js
vendored
@ -1,4 +1,4 @@
|
||||
import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
|
||||
import {ViewRef, ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
@ -36,7 +36,7 @@ import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[for][of]',
|
||||
properties: {
|
||||
'iterableChanges': 'of | iterableDiff'
|
||||
|
4
modules/angular2/src/directives/if.js
vendored
4
modules/angular2/src/directives/if.js
vendored
@ -1,4 +1,4 @@
|
||||
import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
|
||||
import {ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
|
||||
import {isBlank} from 'angular2/src/facade/lang';
|
||||
@ -26,7 +26,7 @@ import {isBlank} from 'angular2/src/facade/lang';
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[if]',
|
||||
properties: {
|
||||
'condition': 'if'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
|
||||
/**
|
||||
* The `NonBindable` directive tells Angular not to compile or bind the contents of the current
|
||||
@ -15,7 +15,7 @@ import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[non-bindable]',
|
||||
compileChildren: false
|
||||
})
|
||||
|
8
modules/angular2/src/directives/switch.js
vendored
8
modules/angular2/src/directives/switch.js
vendored
@ -1,4 +1,4 @@
|
||||
import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
|
||||
import {ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
|
||||
import {isPresent, isBlank, normalizeBlank} from 'angular2/src/facade/lang';
|
||||
@ -50,7 +50,7 @@ class SwitchView {
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[switch]',
|
||||
properties: {
|
||||
'value': 'switch'
|
||||
@ -164,7 +164,7 @@ export class Switch {
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[switch-when]',
|
||||
properties: {
|
||||
'when' : 'switch-when'
|
||||
@ -206,7 +206,7 @@ export class SwitchWhen {
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[switch-default]'
|
||||
})
|
||||
export class SwitchDefault {
|
||||
|
Reference in New Issue
Block a user