chore(): don't underscore private vars for directives

This commit is contained in:
Tim Lancina
2016-01-13 14:31:07 -06:00
parent db41babfc4
commit b0a4a36ded

View File

@ -7,22 +7,22 @@ import {Platform} from '../../platform/platform';
* @private * @private
*/ */
export class DisplayWhen { export class DisplayWhen {
protected _isMatch: boolean = false; protected isMatch: boolean = false;
private _platform: Platform; private platform: Platform;
private _conditions: string[]; private conditions: string[];
constructor(conditions: string, platform: Platform, ngZone: NgZone) { constructor(conditions: string, platform: Platform, ngZone: NgZone) {
this._platform = platform; this.platform = platform;
if (!conditions) return; if (!conditions) return;
this._conditions = conditions.split(','); this.conditions = conditions.split(',');
// check if its one of the matching platforms first // check if its one of the matching platforms first
// a platform does not change during the life of an app // a platform does not change during the life of an app
for (let i = 0; i < this._conditions.length; i++) { for (let i = 0; i < this.conditions.length; i++) {
if (this._conditions[i] && platform.is(this._conditions[i])) { if (this.conditions[i] && platform.is(this.conditions[i])) {
this._isMatch = true; this.isMatch = true;
return; return;
} }
} }
@ -40,15 +40,15 @@ export class DisplayWhen {
} }
orientation() { orientation() {
for (let i = 0; i < this._conditions.length; i++) { for (let i = 0; i < this.conditions.length; i++) {
if (this._conditions[i] == 'portrait') { if (this.conditions[i] == 'portrait') {
this._isMatch = this._platform.isPortrait(); this.isMatch = this.platform.isPortrait();
return true; return true;
} }
if (this._conditions[i] == 'landscape') { if (this.conditions[i] == 'landscape') {
this._isMatch = this._platform.isLandscape(); this.isMatch = this.platform.isLandscape();
return true; return true;
} }
} }
@ -88,7 +88,7 @@ export class ShowWhen extends DisplayWhen {
* @private * @private
*/ */
get hidden() { get hidden() {
return !this._isMatch; return !this.isMatch;
} }
} }
@ -125,7 +125,7 @@ export class HideWhen extends DisplayWhen {
* @private * @private
*/ */
get hidden() { get hidden() {
return this._isMatch; return this.isMatch;
} }
} }