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,6 +1,6 @@
import { Component } from '@angular/core';
// import { AlertController } from '@ionic/angular';
import { AlertController } from '@ionic/angular';
@Component({
selector: 'app-alert-page',
@ -21,18 +21,17 @@ import { Component } from '@angular/core';
})
export class AlertPageComponent {
constructor(/*private alertController: AlertController*/) {
constructor(private alertController: AlertController) {
}
clickMe() {
/*const alert = this.alertController.create({
const alert = this.alertController.create({
title: 'ohhhh snap',
message: 'Gretting from an ng cli app',
});
alert.present();*/
alert('yeah');
alert.present();
}
}

View File

@ -4,6 +4,8 @@ import { CommonModule } from '@angular/common';
import { AlertPageComponent } from './alert-page.component';
import { AlertRoutingModule } from './alert-routing.module';
import { AlertController } from '@ionic/angular';
@NgModule({
imports: [
CommonModule,

View File

@ -4,7 +4,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
// import { IonicAngularModule } from '@ionic/angular';
import { AlertController } from '@ionic/angular';
@NgModule({
declarations: [AppComponent],
@ -13,7 +13,9 @@ import { AppRoutingModule } from './app-routing.module';
BrowserModule,
// IonicAngularModule
],
providers: [],
providers: [
AlertController
],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})