fix(angular): add injectable decorator to fix injectable issues

This commit is contained in:
Dan Bucholtz
2017-11-22 00:31:05 -06:00
parent 6385da971d
commit f96fd86613
8 changed files with 28 additions and 17 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -1,3 +1,4 @@
import { Injectable } from '@angular/core';
import { NavOptions, PublicNavController, ViewController } from '@ionic/core';
import { hydrateElement } from '../util/util';