fix(CSSClass): change selector to ng-class
BREAKING CHANGE: The selector for the CSSClass directive was changed from [class] to [ng-class]. The directive itself was renamed from CSSClass to NgClass Closes #3498
This commit is contained in:
@ -25,17 +25,17 @@ import {ListWrapper, StringMapWrapper, isListLikeIterable} from 'angular2/src/fa
|
||||
* # Example:
|
||||
*
|
||||
* ```
|
||||
* <div class="message" [class]="{error: errorCount > 0}">
|
||||
* <div class="message" [ng-class]="{error: errorCount > 0}">
|
||||
* Please check errors.
|
||||
* </div>
|
||||
* ```
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[class]',
|
||||
selector: '[ng-class]',
|
||||
lifecycle: [LifecycleEvent.onCheck, LifecycleEvent.onDestroy],
|
||||
properties: ['rawClass: class']
|
||||
properties: ['rawClass: ng-class']
|
||||
})
|
||||
export class CSSClass {
|
||||
export class NgClass {
|
||||
private _differ: any;
|
||||
private _mode: string;
|
||||
_rawClass;
|
@ -19,7 +19,7 @@ export class CompileElement {
|
||||
// inherited down to children if they don't have an own elementBinder
|
||||
inheritedElementBinder: ElementBinderBuilder = null;
|
||||
compileChildren: boolean = true;
|
||||
elementDescription: string; // e.g. '<div [class]="foo">' : used to provide context in case of
|
||||
elementDescription: string; // e.g. '<div [title]="foo">' : used to provide context in case of
|
||||
// error
|
||||
|
||||
constructor(public element, compilationUnit: string = '') {
|
||||
|
Reference in New Issue
Block a user