mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(): fix IonicApp types
This commit is contained in:
@ -13,20 +13,19 @@ import {rafFrames} from '../../util/dom';
|
|||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class IonicApp {
|
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(
|
constructor(
|
||||||
private _config: Config,
|
private _config: Config,
|
||||||
private _clickBlock: ClickBlock,
|
private _clickBlock: ClickBlock,
|
||||||
private _zone: NgZone
|
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.
|
* Sets the document title.
|
||||||
|
@ -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';
|
import {IonicApp} from './app';
|
||||||
|
|
||||||
@ -41,6 +41,8 @@ import {IonicApp} from './app';
|
|||||||
inputs: ['id']
|
inputs: ['id']
|
||||||
})
|
})
|
||||||
export class IdRef {
|
export class IdRef {
|
||||||
|
component: any;
|
||||||
|
id: string;
|
||||||
|
|
||||||
constructor(private _app: IonicApp, private _elementRef: ElementRef, private _appViewManager: AppViewManager) {
|
constructor(private _app: IonicApp, private _elementRef: ElementRef, private _appViewManager: AppViewManager) {
|
||||||
// Grab the component this directive is attached to
|
// Grab the component this directive is attached to
|
||||||
@ -75,11 +77,11 @@ export class IdRef {
|
|||||||
* @demo /docs/v2/demos/attr/
|
* @demo /docs/v2/demos/attr/
|
||||||
*/
|
*/
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[attr]',
|
selector: '[attr]'
|
||||||
inputs: ['attr']
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export class Attr {
|
export class Attr {
|
||||||
|
@Input() attr: string;
|
||||||
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}
|
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user