mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 22:17:40 +08:00
fix(): renamed all ts component files to be tsx and ensured they contained valid type definitions.
This commit is contained in:
@ -15,13 +15,13 @@ export class LoadingController implements IonicControllerApi {
|
||||
|
||||
ionViewDidLoad() {
|
||||
this.appRoot = document.querySelector('ion-app') || document.body;
|
||||
(<GlobalNamespace>Ionic).loadController('loading', this);
|
||||
(Ionic as GlobalNamespace).loadController('loading', this);
|
||||
}
|
||||
|
||||
|
||||
load(opts?: LoadingOptions) {
|
||||
// create ionic's wrapping ion-loading component
|
||||
const loading: Loading = document.createElement<any>('ion-loading');
|
||||
const loading: Loading = document.createElement('ion-loading') as any;
|
||||
|
||||
const id = this.ids++;
|
||||
|
||||
@ -34,7 +34,7 @@ export class LoadingController implements IonicControllerApi {
|
||||
Object.assign(loading, opts);
|
||||
|
||||
// append the loading element to the document body
|
||||
this.appRoot.appendChild(<any>loading);
|
||||
this.appRoot.appendChild(loading as any);
|
||||
|
||||
// store the resolve function to be called later up when the loading loads
|
||||
return new Promise<Loading>(resolve => {
|
@ -15,13 +15,13 @@ export class ModalController implements IonicControllerApi {
|
||||
|
||||
ionViewDidLoad() {
|
||||
this.appRoot = document.querySelector('ion-app') || document.body;
|
||||
(<GlobalNamespace>Ionic).loadController('modal', this);
|
||||
(Ionic as GlobalNamespace).loadController('modal', this);
|
||||
}
|
||||
|
||||
|
||||
load(opts?: ModalOptions) {
|
||||
// create ionic's wrapping ion-modal component
|
||||
const modal: Modal = document.createElement<any>('ion-modal');
|
||||
const modal: Modal = document.createElement('ion-modal') as any;
|
||||
|
||||
const id = this.ids++;
|
||||
|
||||
@ -34,7 +34,7 @@ export class ModalController implements IonicControllerApi {
|
||||
Object.assign(modal, opts);
|
||||
|
||||
// append the modal element to the document body
|
||||
this.appRoot.appendChild(<any>modal);
|
||||
this.appRoot.appendChild(modal as any);
|
||||
|
||||
// store the resolve function to be called later up when the modal loads
|
||||
return new Promise<Modal>(resolve => {
|
Reference in New Issue
Block a user