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:
10
modules/angular2/src/forms/directives.js
vendored
10
modules/angular2/src/forms/directives.js
vendored
@ -1,4 +1,4 @@
|
||||
import {Decorator, onChange} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive, onChange} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Ancestor} from 'angular2/src/core/annotations_impl/visibility';
|
||||
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
|
||||
import {Optional} from 'angular2/di';
|
||||
@ -25,7 +25,7 @@ import {Validators} from './validators';
|
||||
*
|
||||
* @exportedAs angular2/forms
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[control]',
|
||||
hostListeners: {
|
||||
'change' : 'onChange($event.target.value)',
|
||||
@ -59,7 +59,7 @@ export class DefaultValueAccessor {
|
||||
*
|
||||
* @exportedAs angular2/forms
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: 'input[type=checkbox][control]',
|
||||
hostListeners: {
|
||||
'change' : 'onChange($event.target.checked)'
|
||||
@ -118,7 +118,7 @@ export class CheckboxControlValueAccessor {
|
||||
*
|
||||
* @exportedAs angular2/forms
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
lifecycle: [onChange],
|
||||
selector: '[control]',
|
||||
properties: {
|
||||
@ -215,7 +215,7 @@ export class ControlDirective {
|
||||
*
|
||||
* @exportedAs angular2/forms
|
||||
*/
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[control-group]',
|
||||
properties: {
|
||||
'controlGroup' : 'control-group'
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {Decorator} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
|
||||
import {Validators} from './validators';
|
||||
import {ControlDirective} from './directives';
|
||||
|
||||
@Decorator({
|
||||
@Directive({
|
||||
selector: '[required]'
|
||||
})
|
||||
export class RequiredValidatorDirective {
|
||||
|
Reference in New Issue
Block a user