mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(angular): add injectable decorator to fix injectable issues
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlertOptions } from '@ionic/core';
|
||||
|
||||
import { ensureElementInBody, hydrateElement } from '../util/util';
|
||||
|
||||
let alertId = 0;
|
||||
|
||||
@Injectable()
|
||||
export class AlertController {
|
||||
create(opts?: AlertOptions): AlertProxy {
|
||||
return getAlertProxy(opts);
|
||||
|
@ -1,9 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NavContainer } from '@ionic/core';
|
||||
import { hydrateElement } from '../util/util';
|
||||
|
||||
@Injectable()
|
||||
export class App {
|
||||
|
||||
constructor(private element: HTMLIonAppElement) {
|
||||
private element: HTMLIonAppElement;
|
||||
constructor() {
|
||||
this.element = document.querySelector('ion-app') as HTMLIonAppElement;
|
||||
}
|
||||
|
||||
setTitle(title: string) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NavOptions, PublicNavController, ViewController } from '@ionic/core';
|
||||
import { hydrateElement } from '../util/util';
|
||||
|
||||
|
Reference in New Issue
Block a user