fix(Input): put @Input above getters

This commit is contained in:
Adam Bradley
2016-01-14 20:05:00 -06:00
parent c740b8e479
commit 1a3d8c8814
4 changed files with 12 additions and 12 deletions

View File

@ -81,11 +81,11 @@ export class Checkbox {
this.checked = !this.checked;
}
@Input()
get checked() {
return !!this._checked;
}
@Input()
set checked(val) {
this._checked = !!val;
this._renderer.setElementAttribute(this._elementRef, 'aria-checked', this._checked.toString());

View File

@ -70,12 +70,12 @@ export class Icon {
}
}
get name(): string {
@Input()
get name() {
return this._name;
}
@Input()
set name(val: string) {
set name(val) {
if (!(/^md-|^ios-|^logo-/.test(val))) {
// this does not have one of the defaults
// so lets auto add in the mode prefix for them
@ -85,31 +85,31 @@ export class Icon {
this.update();
}
@Input()
get ios(): string {
return this._ios;
}
@Input()
set ios(val: string) {
this._ios = val;
this.update();
}
@Input()
get md(): string {
return this._md;
}
@Input()
set md(val: string) {
this._md = val;
this.update();
}
@Input()
get isActive() {
return (this._isActive === undefined || this._isActive === true || this._isActive === 'true');
}
@Input()
set isActive(val) {
this._isActive = val;
this.update();

View File

@ -10,17 +10,17 @@ import {Directive, ElementRef, Input} from 'angular2/core';
export class Option {
private _checked: boolean = false;
@Input() value: string;
constructor(private _elementRef: ElementRef) {
this._checked = false;
}
@Input() value: string;
@Input()
get checked() {
return this._checked;
}
@Input()
set checked(val: any) {
this._checked = (val === 'true' || val === true || val === '');
}

View File

@ -157,11 +157,11 @@ export class Toggle {
this.checked = !this.checked;
}
@Input()
get checked(): boolean {
return !!this._checked;
}
@Input()
set checked(val: boolean) {
this._checked = !!val;
this._renderer.setElementAttribute(this._elementRef, 'aria-checked', this._checked.toString());