feat(Directive): convert properties to an array
fixes #2013 BREAKING CHANGE: Before @Directive(properties: { 'sameName': 'sameName', 'directiveProp': 'elProp | pipe' }) After @Directive(properties: [ 'sameName', 'directiveProp: elProp | pipe' ])
This commit is contained in:
@ -4,7 +4,7 @@ import {ElementRef} from 'angular2/core';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
|
||||
@Directive({selector: '[class]', properties: {'iterableChanges': 'class | keyValDiff'}})
|
||||
@Directive({selector: '[class]', properties: ['iterableChanges: class | keyValDiff']})
|
||||
export class CSSClass {
|
||||
_domEl;
|
||||
constructor(ngEl: ElementRef) { this._domEl = ngEl.domElement; }
|
||||
|
@ -36,7 +36,7 @@ import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Directive(
|
||||
{selector: '[ng-for][ng-for-of]', properties: {'iterableChanges': 'ngForOf | iterableDiff'}})
|
||||
{selector: '[ng-for][ng-for-of]', properties: ['iterableChanges: ngForOf | iterableDiff']})
|
||||
export class NgFor {
|
||||
viewContainer: ViewContainerRef;
|
||||
protoViewRef: ProtoViewRef;
|
||||
|
@ -27,7 +27,7 @@ import {isBlank} from 'angular2/src/facade/lang';
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Directive({selector: '[ng-if]', properties: {'ngIf': 'ngIf'}})
|
||||
@Directive({selector: '[ng-if]', properties: ['ngIf']})
|
||||
export class NgIf {
|
||||
viewContainer: ViewContainerRef;
|
||||
protoViewRef: ProtoViewRef;
|
||||
|
@ -44,7 +44,7 @@ export class SwitchView {
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Directive({selector: '[ng-switch]', properties: {'ngSwitch': 'ngSwitch'}})
|
||||
@Directive({selector: '[ng-switch]', properties: ['ngSwitch']})
|
||||
export class NgSwitch {
|
||||
_switchValue: any;
|
||||
_useDefault: boolean;
|
||||
@ -153,7 +153,7 @@ export class NgSwitch {
|
||||
*
|
||||
* @exportedAs angular2/directives
|
||||
*/
|
||||
@Directive({selector: '[ng-switch-when]', properties: {'ngSwitchWhen': 'ngSwitchWhen'}})
|
||||
@Directive({selector: '[ng-switch-when]', properties: ['ngSwitchWhen']})
|
||||
export class NgSwitchWhen {
|
||||
_value: any;
|
||||
_switch: NgSwitch;
|
||||
|
Reference in New Issue
Block a user