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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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