test(ngmodule): update to ngmodule

This commit is contained in:
Adam Bradley
2016-09-13 15:44:02 -05:00
parent b8fb9c7c6d
commit d7be8a80c0
232 changed files with 4612 additions and 4893 deletions

View File

@ -1,12 +1,12 @@
import { Component } from '@angular/core';
import { Component, NgModule } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { ionicBootstrap, SegmentButton } from '../../../../../src';
import { IonicApp, IonicModule, SegmentButton } from '../../../..';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
export class E2EPage {
relationship: string = 'enemies';
modelStyle: string = 'B';
appType: string = 'free';
@ -41,8 +41,22 @@ class E2EPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
export class E2EApp {
root = E2EPage;
}
ionicBootstrap(E2EApp);
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}

View File

@ -1,11 +1,11 @@
import { Component } from '@angular/core';
import { ionicBootstrap, NavController } from '../../../../../src';
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule, NavController } from '../../../..';
@Component({
templateUrl: 'main.html',
})
class SegmentPage {
export class SegmentPage {
signInType: string;
constructor(public navCtrl: NavController) {
@ -35,14 +35,30 @@ class SegmentPage {
</ion-content>
`
})
class SegmentPage2 {}
export class SegmentPage2 {}
@Component({
template: `<ion-nav [root]="root"></ion-nav>`
})
class E2EApp {
export class E2EApp {
root = SegmentPage;
}
ionicBootstrap(E2EApp);
@NgModule({
declarations: [
E2EApp,
SegmentPage,
SegmentPage2
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
SegmentPage,
SegmentPage2
]
})
export class AppModule {}

View File

@ -1,26 +1,26 @@
import { Component, ViewChild } from '@angular/core';
import { ionicBootstrap, Slides, SegmentButton } from '../../../../../src';
import { Component, ViewChild, NgModule } from '@angular/core';
import { IonicApp, IonicModule, Slides, SegmentButton } from '../../../..';
@Component({
templateUrl: 'main.html',
})
class SegmentPage {
export class SegmentPage {
@ViewChild('loopSlider') sliderComponent: Slides;
selectedSegment = "first";
selectedSegment = 'first';
slides = [
{
id: "first",
title: "First Slide"
id: 'first',
title: 'First Slide'
},
{
id: "second",
title: "Second Slide"
id: 'second',
title: 'Second Slide'
},
{
id: "third",
title: "Third Slide"
id: 'third',
title: 'Third Slide'
}
];
@ -29,7 +29,7 @@ class SegmentPage {
}
onSegmentChanged(segmentButton: SegmentButton) {
console.log("Segment changed to", segmentButton.value);
console.log('Segment changed to', segmentButton.value);
const selectedIndex = this.slides.findIndex((slide) => {
return slide.id === segmentButton.value;
@ -49,8 +49,22 @@ class SegmentPage {
@Component({
template: `<ion-nav [root]="root"></ion-nav>`
})
class E2EApp {
export class E2EApp {
root = SegmentPage;
}
ionicBootstrap(E2EApp);
@NgModule({
declarations: [
E2EApp,
SegmentPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
SegmentPage
]
})
export class AppModule {}