mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
test(angular): update ionic/angular test app
This commit is contained in:
@ -10,7 +10,11 @@
|
|||||||
"assets": [
|
"assets": [
|
||||||
"assets",
|
"assets",
|
||||||
"favicon.ico",
|
"favicon.ico",
|
||||||
{ "glob": "**/*", "input": "../node_modules/@ionic/core/dist", "output": "./ionic/core" }
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "../node_modules/@ionic/angular/dist/ionic",
|
||||||
|
"output": "./ionic"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"index": "index.html",
|
"index": "index.html",
|
||||||
"main": "main.ts",
|
"main": "main.ts",
|
||||||
|
@ -8,7 +8,7 @@ import { ActionSheetController } from '@ionic/angular';
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Action Sheet</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { ActionSheetPageComponent } from './action-sheet-page.component';
|
import { ActionSheetPageComponent } from './action-sheet-page.component';
|
||||||
import { ActionSheetRoutingModule } from './action-sheet-routing.module';
|
import { ActionSheetRoutingModule } from './action-sheet-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
ActionSheetRoutingModule
|
ActionSheetRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [ActionSheetPageComponent],
|
declarations: [ActionSheetPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class ActionSheetModule { }
|
export class ActionSheetModule { }
|
||||||
|
@ -8,7 +8,7 @@ import { AlertController } from '@ionic/angular';
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Alert</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { AlertPageComponent } from './alert-page.component';
|
import { AlertPageComponent } from './alert-page.component';
|
||||||
import { AlertRoutingModule } from './alert-routing.module';
|
import { AlertRoutingModule } from './alert-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
AlertRoutingModule
|
AlertRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [AlertPageComponent],
|
declarations: [AlertPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class AlertModule { }
|
export class AlertModule { }
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { PostTestService } from './post-test/post-test.service';
|
import { PostTestService } from './post-test/post-test.service';
|
||||||
|
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
@ -14,10 +14,9 @@ import { IonicAngularModule } from '@ionic/angular';
|
|||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
IonicAngularModule.forRoot(),
|
IonicModule.forRoot(),
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
||||||
providers: [PostTestService]
|
providers: [PostTestService]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
@ -1,83 +1,86 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
|
import { Badge } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-badge-page',
|
selector: 'app-badge-page',
|
||||||
template: `
|
template: `
|
||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Badges</ion-title>
|
<ion-title>Badges</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-list-header>Badges Right</ion-list-header>
|
<ion-list-header>Badges Right</ion-list-header>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="end" color="primary">99</ion-badge>
|
<ion-badge slot="end" color="primary">99</ion-badge>
|
||||||
<ion-label>Default Badge</ion-label>
|
<ion-label>Default Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="end" color="primary">99</ion-badge>
|
<ion-badge slot="end" color="primary">99</ion-badge>
|
||||||
<ion-label>Primary Badge</ion-label>
|
<ion-label>Primary Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="end" color="secondary">99</ion-badge>
|
<ion-badge slot="end" color="secondary">99</ion-badge>
|
||||||
<ion-label>Secondary Badge</ion-label>
|
<ion-label>Secondary Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="end" color="danger">99</ion-badge>
|
<ion-badge slot="end" color="danger">99</ion-badge>
|
||||||
<ion-label>Danger Badge</ion-label>
|
<ion-label>Danger Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="end" color="light">99</ion-badge>
|
<ion-badge slot="end" color="light">99</ion-badge>
|
||||||
<ion-label>Light Badge</ion-label>
|
<ion-label>Light Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="end" color="dark">99</ion-badge>
|
<ion-badge slot="end" color="dark">99</ion-badge>
|
||||||
<ion-label>Dark Badge</ion-label>
|
<ion-label>Dark Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item (click)="toggleColor()">
|
<ion-item (click)="toggleColor()">
|
||||||
<ion-badge slot="end" [color]="dynamicColor">{{dynamicColor}}</ion-badge>
|
<ion-badge slot="end" [color]="dynamicColor">{{dynamicColor}}</ion-badge>
|
||||||
<ion-label>Dynamic Badge Color (toggle)</ion-label>
|
<ion-label>Dynamic Badge Color (toggle)</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-list-header>Badges Left</ion-list-header>
|
<ion-list-header>Badges Left</ion-list-header>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="start" color="primary">99</ion-badge>
|
<ion-badge slot="start" color="primary">99</ion-badge>
|
||||||
<ion-label>Default Badge</ion-label>
|
<ion-label>Default Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="start" color="primary">99</ion-badge>
|
<ion-badge slot="start" color="primary">99</ion-badge>
|
||||||
<ion-label>Primary Badge</ion-label>
|
<ion-label>Primary Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="start" color="secondary">99</ion-badge>
|
<ion-badge slot="start" color="secondary">99</ion-badge>
|
||||||
<ion-label>Secondary Badge</ion-label>
|
<ion-label>Secondary Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="start" color="danger">99</ion-badge>
|
<ion-badge slot="start" color="danger">99</ion-badge>
|
||||||
<ion-label>Danger Badge</ion-label>
|
<ion-label>Danger Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="start" color="light">99</ion-badge>
|
<ion-badge slot="start" color="light">99</ion-badge>
|
||||||
<ion-label>Light Badge</ion-label>
|
<ion-label>Light Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-badge slot="start" color="dark">99</ion-badge>
|
<ion-badge slot="start" color="dark">99</ion-badge>
|
||||||
<ion-label>Dark Badge</ion-label>
|
<ion-label>Dark Badge</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-app>
|
</ion-app>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class BadgePageComponent {
|
export class BadgePageComponent {
|
||||||
dynamicColor = 'primary';
|
dynamicColor = 'primary';
|
||||||
|
|
||||||
constructor() {
|
@ViewChild(Badge) badge: Badge;
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
console.log(this.badge);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleColor() {
|
toggleColor() {
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { BadgePageComponent } from './badge-page.component';
|
import { BadgePageComponent } from './badge-page.component';
|
||||||
import { BadgeRoutingModule } from './badge-routing.module';
|
import { BadgeRoutingModule } from './badge-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
BadgeRoutingModule
|
BadgeRoutingModule,
|
||||||
|
IonicModule
|
||||||
],
|
],
|
||||||
declarations: [BadgePageComponent],
|
declarations: [BadgePageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class BadgeModule { }
|
export class BadgeModule { }
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
||||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
||||||
|
|
||||||
@ -14,8 +13,10 @@ describe('InputsTestPageComponent', () => {
|
|||||||
async(() => {
|
async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [BasicInputsPageComponent],
|
declarations: [BasicInputsPageComponent],
|
||||||
imports: [FormsModule, IonicAngularModule.forRoot()],
|
imports: [
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
FormsModule,
|
||||||
|
IonicModule.forRoot()
|
||||||
|
],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
||||||
import { BasicInputsPageRoutingModule } from './basic-inputs-page-routing.module';
|
import { BasicInputsPageRoutingModule } from './basic-inputs-page-routing.module';
|
||||||
@ -11,9 +11,8 @@ import { BasicInputsPageRoutingModule } from './basic-inputs-page-routing.module
|
|||||||
BasicInputsPageRoutingModule,
|
BasicInputsPageRoutingModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
IonicAngularModule
|
IonicModule
|
||||||
],
|
],
|
||||||
declarations: [BasicInputsPageComponent],
|
declarations: [BasicInputsPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class BasicInputsPageModule {}
|
export class BasicInputsPageModule {}
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { CardPageComponent } from './card-page.component';
|
import { CardPageComponent } from './card-page.component';
|
||||||
import { CardRoutingModule } from './card-routing.module';
|
import { CardRoutingModule } from './card-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
CardRoutingModule
|
CardRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [CardPageComponent],
|
declarations: [CardPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class CardModule { }
|
export class CardModule { }
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { ContentPageComponent } from './content-page.component';
|
import { ContentPageComponent } from './content-page.component';
|
||||||
import { ContentRoutingModule } from './content-routing.module';
|
import { ContentRoutingModule } from './content-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
ContentRoutingModule
|
ContentRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [ContentPageComponent],
|
declarations: [ContentPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class ContentModule { }
|
export class ContentModule { }
|
||||||
|
@ -1,88 +1,88 @@
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<form #myForm="ngForm">
|
<form #myForm="ngForm" class="ion-page">
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Sample Form</ion-title>
|
<ion-title>Sample Form</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label floating>First Name</ion-label>
|
||||||
|
<ion-input name="firstName" #viewFirstName="ngModel" [(ngModel)]="firstName" required minlength="2"></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<ion-text *ngIf="viewFirstName.invalid && (viewFirstName.dirty || viewFirstName.touched)" color="danger">
|
||||||
|
<small *ngIf="viewFirstName.errors['required']">First Name is required</small>
|
||||||
|
<small *ngIf="viewFirstName.errors['minlength']">First Name must be at least 2 characters long</small>
|
||||||
|
</ion-text>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label floating>Last Name</ion-label>
|
||||||
|
<ion-input name="lastName" #viewLastName="ngModel" [(ngModel)]="lastName" required minlength="4"></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<ion-text *ngIf="viewLastName.invalid && (viewLastName.dirty || viewLastName.touched)" color="danger">
|
||||||
|
<small *ngIf="viewLastName.errors['required']">Last Name is required</small>
|
||||||
|
<small *ngIf="viewLastName.errors['minlength']">Last Name must be at least 4 characters long</small>
|
||||||
|
</ion-text>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Desired Job Title</ion-label>
|
||||||
|
<ion-select name="jobTitle" [(ngModel)]="jobTitle" #viewJobTitle="ngModel" required>
|
||||||
|
<ion-select-option value="manager">Cat Herder</ion-select-option>
|
||||||
|
<ion-select-option value="captain">Nerf Herder (Scruffy)</ion-select-option>
|
||||||
|
<ion-select-option value="engineer">Cat</ion-select-option>
|
||||||
|
<ion-select-option value="tester">Trier of Things</ion-select-option>
|
||||||
|
</ion-select>
|
||||||
|
</ion-item>
|
||||||
|
<ion-text *ngIf="viewJobTitle.invalid && (viewJobTitle.dirty || viewJobTitle.touched)" color="danger">
|
||||||
|
<small *ngIf="viewJobTitle.errors['required']">Job Title is required</small>
|
||||||
|
</ion-text>
|
||||||
|
<ion-item-divider>
|
||||||
|
<ion-label>I Would Like To:</ion-label>
|
||||||
|
</ion-item-divider>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Drink the Beers</ion-label>
|
||||||
|
<ion-toggle name="drinkBeers" color="dark" [(ngModel)]="drinkBeers"></ion-toggle>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Drink the Teas</ion-label>
|
||||||
|
<ion-toggle name="drinkTeas" color="secondary" [(ngModel)]="drinkTeas"></ion-toggle>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Make the Coffees</ion-label>
|
||||||
|
<ion-toggle name="makeCoffee" color="primary" [(ngModel)]="makeCoffee"></ion-toggle>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Feed the Engineers</ion-label>
|
||||||
|
<ion-toggle name="feedEngineers" color="danger" [(ngModel)]="feedEngineers"></ion-toggle>
|
||||||
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label floating>First Name</ion-label>
|
<ion-label floating>Short Self Description</ion-label>
|
||||||
<ion-input name="firstName" #viewFirstName="ngModel" [(ngModel)]="firstName" required minlength="2"></ion-input>
|
<ion-textarea name="selfDescription" #viewSelfDescription="ngModel" [(ngModel)]="selfDescription" required minlength="25"></ion-textarea>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-text *ngIf="viewFirstName.invalid && (viewFirstName.dirty || viewFirstName.touched)" color="danger">
|
<ion-text *ngIf="viewSelfDescription.invalid && (viewSelfDescription.dirty || viewSelfDescription.touched)" color="danger">
|
||||||
<small *ngIf="viewFirstName.errors['required']">First Name is required</small>
|
<small *ngIf="viewSelfDescription.errors['required']">Self Description is required</small>
|
||||||
<small *ngIf="viewFirstName.errors['minlength']">First Name must be at least 2 characters long</small>
|
<small *ngIf="viewSelfDescription.errors['minlength']">Please tell us more</small>
|
||||||
</ion-text>
|
</ion-text>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label floating>Last Name</ion-label>
|
<ion-label floating>Desired Salary</ion-label>
|
||||||
<ion-input name="lastName" #viewLastName="ngModel" [(ngModel)]="lastName" required minlength="4"></ion-input>
|
<ion-input name="desiredSalary" #viewSalary="ngModel" type="number" required [(ngModel)]="desiredSalary"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-text *ngIf="viewLastName.invalid && (viewLastName.dirty || viewLastName.touched)" color="danger">
|
<ion-text *ngIf="viewSalary.invalid && (viewSalary.dirty || viewSalary.touched)" color="danger">
|
||||||
<small *ngIf="viewLastName.errors['required']">Last Name is required</small>
|
<small *ngIf="viewSalary.errors['required']">Desired Salary is required</small>
|
||||||
<small *ngIf="viewLastName.errors['minlength']">Last Name must be at least 4 characters long</small>
|
</ion-text>
|
||||||
</ion-text>
|
<ion-item-divider>
|
||||||
<ion-item>
|
<ion-label>My Level of Happy</ion-label>
|
||||||
<ion-label>Desired Job Title</ion-label>
|
</ion-item-divider>
|
||||||
<ion-select name="jobTitle" [(ngModel)]="jobTitle" #viewJobTitle="ngModel" required>
|
<ion-item>
|
||||||
<ion-select-option value="manager">Cat Herder</ion-select-option>
|
<ion-range name="levelOfHappy" [(ngModel)]="levelOfHappy">
|
||||||
<ion-select-option value="captain">Nerf Herder (Scruffy)</ion-select-option>
|
<ion-icon name="sad" slot="start"></ion-icon>
|
||||||
<ion-select-option value="engineer">Cat</ion-select-option>
|
<ion-icon name="happy" slot="end"></ion-icon>
|
||||||
<ion-select-option value="tester">Trier of Things</ion-select-option>
|
</ion-range>
|
||||||
</ion-select>
|
</ion-item>
|
||||||
</ion-item>
|
</ion-list>
|
||||||
<ion-text *ngIf="viewJobTitle.invalid && (viewJobTitle.dirty || viewJobTitle.touched)" color="danger">
|
</ion-content>
|
||||||
<small *ngIf="viewJobTitle.errors['required']">Job Title is required</small>
|
<ion-footer>
|
||||||
</ion-text>
|
<ion-button expand="block" [disabled]="myForm.invalid" (click)="save(myForm.value)">
|
||||||
<ion-divider>
|
<ion-icon name="save" slot="start"></ion-icon>Looks Good to Me</ion-button>
|
||||||
<ion-label>I Would Like To:</ion-label>
|
</ion-footer>
|
||||||
</ion-divider>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label>Drink the Beers</ion-label>
|
|
||||||
<ion-toggle name="drinkBeers" color="dark" [(ngModel)]="drinkBeers"></ion-toggle>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label>Drink the Teas</ion-label>
|
|
||||||
<ion-toggle name="drinkTeas" color="secondary" [(ngModel)]="drinkTeas"></ion-toggle>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label>Make the Coffees</ion-label>
|
|
||||||
<ion-toggle name="makeCoffee" color="primary" [(ngModel)]="makeCoffee"></ion-toggle>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label>Feed the Engineers</ion-label>
|
|
||||||
<ion-toggle name="feedEngineers" color="danger" [(ngModel)]="feedEngineers"></ion-toggle>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label floating>Short Self Description</ion-label>
|
|
||||||
<ion-textarea name="selfDescription" #viewSelfDescription="ngModel" [(ngModel)]="selfDescription" required minlength="25"></ion-textarea>
|
|
||||||
</ion-item>
|
|
||||||
<ion-text *ngIf="viewSelfDescription.invalid && (viewSelfDescription.dirty || viewSelfDescription.touched)" color="danger">
|
|
||||||
<small *ngIf="viewSelfDescription.errors['required']">Self Description is required</small>
|
|
||||||
<small *ngIf="viewSelfDescription.errors['minlength']">Please tell us more</small>
|
|
||||||
</ion-text>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label floating>Desired Salary</ion-label>
|
|
||||||
<ion-input name="desiredSalary" #viewSalary="ngModel" type="number" required [(ngModel)]="desiredSalary"></ion-input>
|
|
||||||
</ion-item>
|
|
||||||
<ion-text *ngIf="viewSalary.invalid && (viewSalary.dirty || viewSalary.touched)" color="danger">
|
|
||||||
<small *ngIf="viewSalary.errors['required']">Desired Salary is required</small>
|
|
||||||
</ion-text>
|
|
||||||
<ion-divider>
|
|
||||||
<ion-label>My Level of Happy</ion-label>
|
|
||||||
</ion-divider>
|
|
||||||
<ion-item>
|
|
||||||
<ion-range name="levelOfHappy" [(ngModel)]="levelOfHappy">
|
|
||||||
<ion-icon name="sad" slot="start"></ion-icon>
|
|
||||||
<ion-icon name="happy" slot="end"></ion-icon>
|
|
||||||
</ion-range>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</ion-content>
|
|
||||||
<ion-footer>
|
|
||||||
<ion-button expand="block" [disabled]="myForm.invalid" (click)="save(myForm.value)">
|
|
||||||
<ion-icon name="save" slot="start"></ion-icon>Looks Good to Me</ion-button>
|
|
||||||
</ion-footer>
|
|
||||||
</form>
|
</form>
|
||||||
</ion-app>
|
</ion-app>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { FormSamplePageComponent } from './form-sample-page.component';
|
import { FormSamplePageComponent } from './form-sample-page.component';
|
||||||
import { FormSamplePageRoutingModule } from './form-sample-page-routing.module';
|
import { FormSamplePageRoutingModule } from './form-sample-page-routing.module';
|
||||||
@ -11,9 +11,8 @@ import { FormSamplePageRoutingModule } from './form-sample-page-routing.module';
|
|||||||
FormSamplePageRoutingModule,
|
FormSamplePageRoutingModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
IonicAngularModule
|
IonicModule
|
||||||
],
|
],
|
||||||
declarations: [FormSamplePageComponent],
|
declarations: [FormSamplePageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class FormSamplePageModule {}
|
export class FormSamplePageModule {}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { GroupInputsPageComponent } from './group-inputs-page.component';
|
import { GroupInputsPageComponent } from './group-inputs-page.component';
|
||||||
|
|
||||||
@ -12,9 +11,11 @@ describe('GroupInputsPageComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
async(() => {
|
async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [FormsModule, IonicAngularModule],
|
imports: [
|
||||||
declarations: [GroupInputsPageComponent],
|
FormsModule,
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
IonicModule
|
||||||
|
],
|
||||||
|
declarations: [GroupInputsPageComponent]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { GroupInputsPageComponent } from './group-inputs-page.component';
|
import { GroupInputsPageComponent } from './group-inputs-page.component';
|
||||||
import { GroupInputsPageRoutingModule } from './group-inputs-page-routing.module';
|
import { GroupInputsPageRoutingModule } from './group-inputs-page-routing.module';
|
||||||
@ -11,9 +11,8 @@ import { GroupInputsPageRoutingModule } from './group-inputs-page-routing.module
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
GroupInputsPageRoutingModule,
|
GroupInputsPageRoutingModule,
|
||||||
IonicAngularModule
|
IonicModule
|
||||||
],
|
],
|
||||||
declarations: [GroupInputsPageComponent],
|
declarations: [GroupInputsPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class GroupInputsPageModule {}
|
export class GroupInputsPageModule {}
|
||||||
|
@ -1,66 +1,74 @@
|
|||||||
<div class='title'>
|
|
||||||
Ionic Core Angular Demo Application
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<h1>
|
||||||
<ul>
|
@ionic/angular tests
|
||||||
<li>
|
</h1>
|
||||||
<a [routerLink]="['/show-hide-when']">Show/Hide When Test Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/basic-inputs']">Basic Inputs Test Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/group-inputs']">Group Inputs Test Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/form-sample']">Form Sample Test Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/alert']">Alert Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/badge']">Badge Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/card']">Card Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/content']">Content Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/actionSheet']">Action Sheet Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/toast']">Toast Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/loading']">Loading Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/modal']">Modal Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/popover']">Popover Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/segment']">Segment Page</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a [routerLink]="['/virtual-scroll']">Virtual Scroll Page</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<h3>Overlays</h3>
|
||||||
<h2>Nav Tests</h2>
|
<ul>
|
||||||
<ul>
|
<li>
|
||||||
<li>
|
<a [routerLink]="['/actionSheet']">Action Sheet Page</a>
|
||||||
<a href='no-routing-nav'>No Routing</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a [routerLink]="['/alert']">Alert Page</a>
|
||||||
<a href='simple-nav/page-one'>Simple Nav</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
</ul>
|
<a [routerLink]="['/loading']">Loading Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/modal']">Modal Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/popover']">Popover Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/toast']">Toast Page</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
<h3>Inputs</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/basic-inputs']">Basic Inputs Test Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/group-inputs']">Group Inputs Test Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/form-sample']">Form Sample Test Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/segment']">Segment Page</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Navigation</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href='no-routing-nav'>No Routing</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='simple-nav/page-one'>Simple Nav</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Content</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/badge']">Badge Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/card']">Card Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/content']">Content Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/show-hide-when']">Show/Hide When Page</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a [routerLink]="['/virtual-scroll']">Virtual Scroll Page</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { HomePageComponent } from './home-page.component';
|
import { HomePageComponent } from './home-page.component';
|
||||||
import { HomePageRoutingModule } from './home-page-routing.module';
|
import { HomePageRoutingModule } from './home-page-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
HomePageRoutingModule
|
HomePageRoutingModule,
|
||||||
|
IonicModule
|
||||||
],
|
],
|
||||||
declarations: [HomePageComponent]
|
declarations: [HomePageComponent]
|
||||||
})
|
})
|
||||||
|
@ -8,7 +8,7 @@ import { LoadingController } from '@ionic/angular';
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Loading</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { LoadingPageComponent } from './loading-page.component';
|
import { LoadingPageComponent } from './loading-page.component';
|
||||||
import { LoadingRoutingModule } from './loading-routing.module';
|
import { LoadingRoutingModule } from './loading-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
LoadingRoutingModule
|
LoadingRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [LoadingPageComponent],
|
declarations: [LoadingPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class LoadingModule { }
|
export class LoadingModule { }
|
||||||
|
@ -9,7 +9,7 @@ import { ModalPageToPresent } from './modal-page-to-present';
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Modal</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
@ -1,27 +1,23 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { ModalPageComponent } from './modal-page.component';
|
import { ModalPageComponent } from './modal-page.component';
|
||||||
import { ModalRoutingModule } from './modal-routing.module';
|
import { ModalRoutingModule } from './modal-routing.module';
|
||||||
|
|
||||||
import { ModalPageToPresent } from './modal-page-to-present';
|
import { ModalPageToPresent } from './modal-page-to-present';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicAngularModule.forRoot(),
|
IonicModule.forRoot(),
|
||||||
ModalRoutingModule
|
ModalRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ModalPageComponent,
|
ModalPageComponent,
|
||||||
ModalPageToPresent
|
ModalPageToPresent
|
||||||
],
|
],
|
||||||
providers: [
|
|
||||||
],
|
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ModalPageToPresent
|
ModalPageToPresent
|
||||||
],
|
]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class ModalModule { }
|
export class ModalModule { }
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { NoRoutingNavPageComponent } from './no-routing-nav.component';
|
import { NoRoutingNavPageComponent } from './no-routing-nav.component';
|
||||||
import { NoRoutingNavRoutingModule } from './no-routing-nav-routing.module';
|
import { NoRoutingNavRoutingModule } from './no-routing-nav-routing.module';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
|
||||||
|
|
||||||
import { PageOne } from './pages/page-one';
|
import { PageOne } from './pages/page-one';
|
||||||
import { PageTwo } from './pages/page-two';
|
import { PageTwo } from './pages/page-two';
|
||||||
@ -13,7 +13,7 @@ import { PageThree } from './pages/page-three';
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
NoRoutingNavRoutingModule,
|
NoRoutingNavRoutingModule,
|
||||||
IonicAngularModule,
|
IonicModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
NoRoutingNavPageComponent,
|
NoRoutingNavPageComponent,
|
||||||
@ -25,7 +25,6 @@ import { PageThree } from './pages/page-three';
|
|||||||
PageOne,
|
PageOne,
|
||||||
PageTwo,
|
PageTwo,
|
||||||
PageThree
|
PageThree
|
||||||
],
|
]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class NoRoutingNavModule { }
|
export class NoRoutingNavModule { }
|
||||||
|
@ -9,7 +9,7 @@ import { PopoverPageToPresent } from './popover-page-to-present';
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Popover</ion-title>
|
||||||
<ion-buttons slot="end">
|
<ion-buttons slot="end">
|
||||||
<ion-button (click)="clickMe()">
|
<ion-button (click)="clickMe()">
|
||||||
No event passed
|
No event passed
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { PopoverPageComponent } from './popover-page.component';
|
import { PopoverPageComponent } from './popover-page.component';
|
||||||
import { PopoverRoutingModule } from './popover-routing.module';
|
import { PopoverRoutingModule } from './popover-routing.module';
|
||||||
@ -10,7 +10,7 @@ import { PopoverPageToPresent } from './popover-page-to-present';
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicAngularModule.forRoot(),
|
IonicModule.forRoot(),
|
||||||
PopoverRoutingModule
|
PopoverRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -21,7 +21,6 @@ import { PopoverPageToPresent } from './popover-page-to-present';
|
|||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
PopoverPageToPresent
|
PopoverPageToPresent
|
||||||
],
|
]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class PopoverModule { }
|
export class PopoverModule { }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { SegmentPageComponent } from './segment-page.component';
|
import { SegmentPageComponent } from './segment-page.component';
|
||||||
import { SegmentRoutingModule } from './segment-routing.module';
|
import { SegmentRoutingModule } from './segment-routing.module';
|
||||||
@ -11,9 +11,8 @@ import { SegmentRoutingModule } from './segment-routing.module';
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
SegmentRoutingModule,
|
SegmentRoutingModule,
|
||||||
IonicAngularModule
|
IonicModule
|
||||||
],
|
],
|
||||||
declarations: [SegmentPageComponent],
|
declarations: [SegmentPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class SegmentModule { }
|
export class SegmentModule { }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Show/Hide When</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { ShowHideWhenComponent } from './show-hide-when-page.component';
|
import { ShowHideWhenComponent } from './show-hide-when-page.component';
|
||||||
import { ShowHideWhenRoutingModule } from './show-hide-when-routing.module';
|
import { ShowHideWhenRoutingModule } from './show-hide-when-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
ShowHideWhenRoutingModule
|
ShowHideWhenRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [ShowHideWhenComponent],
|
declarations: [ShowHideWhenComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class ShowHideWhenModule { }
|
export class ShowHideWhenModule { }
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { PageOne } from './page-one';
|
import { PageOne } from './page-one';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
@ -8,7 +9,7 @@ const routes: Routes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes), IonicModule],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule, IonicModule]
|
||||||
})
|
})
|
||||||
export class PageOneRoutingModule { }
|
export class PageOneRoutingModule { }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { PageOne } from './page-one';
|
import { PageOne } from './page-one';
|
||||||
@ -9,9 +9,6 @@ import { PageOneRoutingModule } from './page-one-routing.module';
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
PageOneRoutingModule
|
PageOneRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [PageOne],
|
declarations: [PageOne]
|
||||||
schemas: [
|
|
||||||
CUSTOM_ELEMENTS_SCHEMA
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class PageOneModule { }
|
export class PageOneModule { }
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { PageThree } from './page-three';
|
import { PageThree } from './page-three';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
@ -8,7 +9,7 @@ const routes: Routes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes), IonicModule],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule, IonicModule]
|
||||||
})
|
})
|
||||||
export class PageThreeRoutingModule { }
|
export class PageThreeRoutingModule { }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { PageThree } from './page-three';
|
import { PageThree } from './page-three';
|
||||||
@ -11,9 +11,6 @@ import { PageThreeRoutingModule } from './page-three-routing.module';
|
|||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
PageThree
|
PageThree
|
||||||
],
|
|
||||||
schemas: [
|
|
||||||
CUSTOM_ELEMENTS_SCHEMA
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class PageThreeModule { }
|
export class PageThreeModule { }
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Component, ViewEncapsulation } from '@angular/core';
|
import { Component, ViewEncapsulation } from '@angular/core';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-three',
|
selector: 'page-three',
|
||||||
@ -9,32 +10,29 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
|||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
Page Three {{ts}}
|
|
||||||
<div>isProd: {{isProd}}</div>
|
|
||||||
<div>paramOne: {{paramOne}}</div>
|
<div>paramOne: {{paramOne}}</div>
|
||||||
<div>paramTwo: {{paramTwo}}</div>
|
<div>paramTwo: {{paramTwo}}</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-button>Go Back</ion-button>
|
<ion-button [routerLink]="['/simple-nav/page-one']">Go to Page One</ion-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ion-button [routerLink]="['/simple-nav/page-two']">Go to Page Two</ion-button>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class PageThree {
|
export class PageThree {
|
||||||
|
|
||||||
ts: number;
|
|
||||||
isProd = false;
|
|
||||||
paramOne: any = null;
|
paramOne: any = null;
|
||||||
paramTwo: any = null;
|
paramTwo: any = null;
|
||||||
|
|
||||||
// constructor(private navController: NavController, private navParams: NavParams) {
|
constructor(private route: ActivatedRoute) {}
|
||||||
|
|
||||||
// this.isProd = navParams.get('isProd');
|
ngOnInit() {
|
||||||
// this.paramOne = navParams.get('paramOne');
|
this.route.params.subscribe(params => {
|
||||||
// this.paramTwo = navParams.get('paramTwo');
|
this.paramOne = params['paramOne'];
|
||||||
|
this.paramTwo = params['paramTwo'];
|
||||||
// setInterval(() => {
|
});
|
||||||
// this.ts = Date.now();
|
}
|
||||||
// }, 500);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { PageTwo } from './page-two';
|
import { PageTwo } from './page-two';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
@ -11,7 +12,7 @@ const routes: Routes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes), IonicModule],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule, IonicModule]
|
||||||
})
|
})
|
||||||
export class PageTwoRoutingModule { }
|
export class PageTwoRoutingModule { }
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import {
|
import { IonicModule } from '@ionic/angular';
|
||||||
IonicAngularModule,
|
|
||||||
} from '@ionic/angular';
|
|
||||||
|
|
||||||
import { PageTwo } from './page-two';
|
import { PageTwo } from './page-two';
|
||||||
import { PageTwoRoutingModule } from './page-two-routing.module';
|
import { PageTwoRoutingModule } from './page-two-routing.module';
|
||||||
|
|
||||||
@ -13,13 +10,10 @@ import { PageTwoRoutingModule } from './page-two-routing.module';
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
PageTwoRoutingModule,
|
PageTwoRoutingModule,
|
||||||
IonicAngularModule,
|
IonicModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
PageTwo,
|
PageTwo,
|
||||||
],
|
|
||||||
schemas: [
|
|
||||||
CUSTOM_ELEMENTS_SCHEMA
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class PageTwoModule { }
|
export class PageTwoModule { }
|
||||||
|
@ -11,12 +11,12 @@ import { Location } from '@angular/common';
|
|||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
Page Two - {{ts}}
|
Page Two
|
||||||
<div>
|
<div>
|
||||||
<ion-button>Go to Page Three</ion-button>
|
<ion-button [routerLink]="['/simple-nav/page-three/paramOne/paramTwo']">Go to Page Three</ion-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-button>Go Back</ion-button>
|
<ion-button [routerLink]="['/simple-nav/page-one']">Go to Page One</ion-button>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
`
|
`
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { SimpleNavPageComponent } from './simple-nav.component';
|
import { SimpleNavPageComponent } from './simple-nav.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
@ -16,7 +17,7 @@ const routes: Routes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes), IonicModule],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule, IonicModule]
|
||||||
})
|
})
|
||||||
export class SimpleNavRoutingModule { }
|
export class SimpleNavRoutingModule { }
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { SimpleNavPageComponent } from './simple-nav.component';
|
import { SimpleNavPageComponent } from './simple-nav.component';
|
||||||
import { SimpleNavRoutingModule } from './simple-nav-routing.module';
|
import { SimpleNavRoutingModule } from './simple-nav-routing.module';
|
||||||
|
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -12,9 +12,8 @@ import { IonicAngularModule } from '@ionic/angular';
|
|||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicAngularModule,
|
IonicModule,
|
||||||
SimpleNavRoutingModule
|
SimpleNavRoutingModule
|
||||||
],
|
]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class SimpleNavModule {}
|
export class SimpleNavModule {}
|
||||||
|
@ -8,7 +8,7 @@ import { ToastController } from '@ionic/angular';
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Test</ion-title>
|
<ion-title>Toast</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { ToastPageComponent } from './toast-page.component';
|
import { ToastPageComponent } from './toast-page.component';
|
||||||
import { ToastRoutingModule } from './toast-routing.module';
|
import { ToastRoutingModule } from './toast-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
ToastRoutingModule
|
ToastRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [ToastPageComponent],
|
declarations: [ToastPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class ToastModule { }
|
export class ToastModule { }
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { IonicAngularModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { VirtualScrollPageComponent } from './virtual-scroll-page.component';
|
import { VirtualScrollPageComponent } from './virtual-scroll-page.component';
|
||||||
import { VirtualScrollRoutingModule } from './virtual-scroll-routing.module';
|
import { VirtualScrollRoutingModule } from './virtual-scroll-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicAngularModule,
|
IonicModule,
|
||||||
VirtualScrollRoutingModule
|
VirtualScrollRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [VirtualScrollPageComponent],
|
declarations: [VirtualScrollPageComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
})
|
||||||
export class VirtualScrollModule { }
|
export class VirtualScrollModule { }
|
||||||
|
@ -2,15 +2,10 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Demo</title>
|
<title>Angular</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<script src="ionic/core/ionic.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
// window.Ionic.config = { mode: 'ios' };
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
|
Reference in New Issue
Block a user