chore(angular): reverting changes to angular module, cannot figure out why app won't work if it's imported

This commit is contained in:
Dan Bucholtz
2017-11-22 00:49:05 -06:00
parent f96fd86613
commit 5ffb31f49a
9 changed files with 26 additions and 33 deletions

View File

@ -12,7 +12,7 @@
"requires": {
"loader-utils": "1.1.0",
"source-map": "0.5.7",
"typescript": "2.5.2",
"typescript": "2.6.1",
"webpack-sources": "1.0.2"
}
},
@ -193,9 +193,9 @@
}
},
"@ionic/angular": {
"version": "0.0.2-2",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-0.0.2-2.tgz",
"integrity": "sha512-TXtQTYeT9ieYT0nVhoehCQR1PSVLyend2zEpZ6LNjQPrFGQF+wAireIlX3YUHs2Ur6qbla0Rk6vQDeUo7jX9xQ=="
"version": "0.0.2-3",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-0.0.2-3.tgz",
"integrity": "sha512-ICH0/ynQR34IeDhoZM4qIZSnBb2rp7lcfObQ3MiuXTKfnFqsmp7bS/eV/v5Mqg8dqHyr0eYfPzYxZ8Cd1qh9Lw=="
},
"@ionic/core": {
"version": "0.0.2-25",
@ -306,12 +306,6 @@
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
},
"typescript": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz",
"integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=",
"dev": true
},
"uglify-es": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.1.6.tgz",
@ -9835,9 +9829,9 @@
"dev": true
},
"typescript": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz",
"integrity": "sha1-A4qV99m7tCCxvzW6MdTFwd0//jQ=",
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz",
"integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=",
"dev": true
},
"uglify-js": {

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,17 +21,19 @@ import { AlertController } from '@ionic/angular';
})
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('kaboom');
}
}

View File

@ -4,8 +4,6 @@ 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,17 +4,15 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { AlertController } from '@ionic/angular';
@NgModule({
declarations: [AppComponent],
imports: [
AppRoutingModule,
BrowserModule,
// IonicAngularModule
],
providers: [
AlertController
// AlertController
],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "0.0.2-2",
"version": "0.0.2-3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "0.0.2-2",
"version": "0.0.2-3",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
@ -27,7 +27,7 @@
"tsc": "tsc -p ."
},
"main": "./dist/src/index.js",
"modules": "./dist/src/index.js",
"module": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"files": [
"dist/"

View File

@ -104,6 +104,5 @@ export function provideNavControllerInjectable(element: any) {
}
export function provideAppInjectable() {
const ionAppElement = document.querySelector('ion-app');
return new App(ionAppElement);
return new App();
}

View File

@ -1,5 +1,6 @@
export * from './directives/ion-nav';
export * from './module';
export * from './providers/alert-controller';
export * from './providers/app';
export * from './providers/nav-controller';
export { IonNavDelegate } from './directives/ion-nav';
export { IonicAngularModule } from './module';
export { AlertController, AlertProxy } from './providers/alert-controller';
export { App } from './providers/app';
export { NavController } from './providers/nav-controller';

View File

@ -7,8 +7,9 @@ let alertId = 0;
@Injectable()
export class AlertController {
create(opts?: AlertOptions): AlertProxy {
return getAlertProxy(opts);
create(opts?: AlertOptions): any {
// return getAlertProxy(opts);
return { };
}
}