Skip to content

Commit

Permalink
fix(NgStyle): remove duplicate input declaration (#9978)
Browse files Browse the repository at this point in the history
fixes #9977
  • Loading branch information
vicb authored Jul 11, 2016
1 parent 2923187 commit 94dc632
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/@angular/common/src/directives/ng_style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ import {isBlank, isPresent} from '../facade/lang';
*
* @stable
*/
@Directive({selector: '[ngStyle]', inputs: ['rawStyle: ngStyle']})
@Directive({selector: '[ngStyle]'})
export class NgStyle implements DoCheck {
/** @internal */
_rawStyle: {[key: string]: string};
_ngStyle: {[key: string]: string};
/** @internal */
_differ: KeyValueDiffer;

Expand All @@ -77,15 +77,15 @@ export class NgStyle implements DoCheck {

@Input()
set ngStyle(v: {[key: string]: string}) {
this._rawStyle = v;
this._ngStyle = v;
if (isBlank(this._differ) && isPresent(v)) {
this._differ = this._differs.find(this._rawStyle).create(null);
this._differ = this._differs.find(this._ngStyle).create(null);
}
}

ngDoCheck() {
if (isPresent(this._differ)) {
var changes = this._differ.diff(this._rawStyle);
var changes = this._differ.diff(this._ngStyle);
if (isPresent(changes)) {
this._applyChanges(changes);
}
Expand Down

0 comments on commit 94dc632

Please sign in to comment.