mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
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:
24
packages/angular/demo/src/app/alert/alert-page.component.ts
Normal file
24
packages/angular/demo/src/app/alert/alert-page.component.ts
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
14
packages/angular/demo/src/app/alert/alert-routing.module.ts
Normal file
14
packages/angular/demo/src/app/alert/alert-routing.module.ts
Normal 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 { }
|
||||
14
packages/angular/demo/src/app/alert/alert.module.ts
Normal file
14
packages/angular/demo/src/app/alert/alert.module.ts
Normal 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 { }
|
||||
@ -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({
|
||||
|
||||
@ -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]
|
||||
|
||||
Reference in New Issue
Block a user