chore(angular/providers): making progress on angular providers, fix merge issues

* chore(input): remove interface .d.ts file, move to .ts file

* refactor(angular): start working on providers, etc

* chore(angular/dependencies): update deps for angular demo
This commit is contained in:
Dan Bucholtz
2017-11-21 11:58:57 -06:00
committed by GitHub
parent d17dfea4c5
commit f269766068
16 changed files with 1125 additions and 690 deletions

View File

@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import { AlertController } from '../../../../src/providers/alert-controller';
@Component({
selector: 'app-alert-page',
template: `
<button (click)="clickMe()">Click Me</button>
`
})
export class AlertPageComponent {
constructor(private alertController: AlertController) {
}
clickMe() {
const alert = this.alertController.create({
message: 'Gretting from an ng cli app'
});
alert.present();
}
}

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AlertPageComponent } from './alert-page.component';
const routes: Routes = [
{ path: '', component: AlertPageComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AlertRoutingModule { }

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AlertPageComponent } from './alert-page.component';
import { AlertRoutingModule } from './alert-routing.module';
@NgModule({
imports: [
CommonModule,
AlertRoutingModule
],
declarations: [AlertPageComponent]
})
export class AlertModule { }

View File

@ -5,7 +5,8 @@ const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'basic-inputs', loadChildren: 'app/basic-inputs-page/basic-inputs-page.module#BasicInputsPageModule' },
{ path: 'group-inputs', loadChildren: 'app/group-inputs-page/group-inputs-page.module#GroupInputsPageModule' },
{ path: 'home', loadChildren: 'app/home-page/home-page.module#HomePageModule' }
{ path: 'home', loadChildren: 'app/home-page/home-page.module#HomePageModule' },
{ path: 'alert', loadChildren: 'app/alert/alert.module#AlertModule' }
];
@NgModule({

View File

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