From 6e9ac500c292fc98de22ec09b31caf53eb6acadf Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 13 Jan 2016 23:05:12 -0600 Subject: [PATCH] chore(): fix IonicApp types --- ionic/components/app/app.ts | 17 ++++++++--------- ionic/components/app/id.ts | 8 +++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts index f9cf582db1..c2f41eac12 100644 --- a/ionic/components/app/app.ts +++ b/ionic/components/app/app.ts @@ -13,20 +13,19 @@ import {rafFrames} from '../../util/dom'; */ @Injectable() export class IonicApp { + private _titleSrv: Title = new Title(); + private _title: string = ''; + private _disTime: number = 0; + private _scrollTime: number = 0; + + // Our component registry map + private components: any = {}; constructor( private _config: Config, private _clickBlock: ClickBlock, private _zone: NgZone - ) { - this._titleSrv = new Title(); - this._title = ''; - this._disTime = 0; - this._scrollTime = 0; - - // Our component registry map - this.components = {}; - } + ) {} /** * Sets the document title. diff --git a/ionic/components/app/id.ts b/ionic/components/app/id.ts index 8efbe00f5e..c271c2b215 100644 --- a/ionic/components/app/id.ts +++ b/ionic/components/app/id.ts @@ -1,4 +1,4 @@ -import {AppViewManager, ElementRef, Directive, Renderer} from 'angular2/core'; +import {AppViewManager, ElementRef, Directive, Renderer, Input} from 'angular2/core'; import {IonicApp} from './app'; @@ -41,6 +41,8 @@ import {IonicApp} from './app'; inputs: ['id'] }) export class IdRef { + component: any; + id: string; constructor(private _app: IonicApp, private _elementRef: ElementRef, private _appViewManager: AppViewManager) { // Grab the component this directive is attached to @@ -75,11 +77,11 @@ export class IdRef { * @demo /docs/v2/demos/attr/ */ @Directive({ - selector: '[attr]', - inputs: ['attr'] + selector: '[attr]' }) export class Attr { + @Input() attr: string; constructor(private _renderer: Renderer, private _elementRef: ElementRef) {} /**