mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
test(bootstrap): update to use ionicBootstrap
This commit is contained in:
@ -1,21 +1,19 @@
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from '@angular/common';
|
||||
|
||||
import {App, IonicApp} from '../../../../../src';
|
||||
import {Component} from '@angular/core';
|
||||
import {FormBuilder, Validators} from '@angular/common';
|
||||
import {ionicBootstrap} from '../../../../../src';
|
||||
|
||||
|
||||
@App({
|
||||
@Component({
|
||||
templateUrl: 'main.html',
|
||||
providers: [FormBuilder],
|
||||
directives: [FORM_DIRECTIVES]
|
||||
providers: [FormBuilder]
|
||||
})
|
||||
class MyApp {
|
||||
class E2EApp {
|
||||
relationship: string = 'enemies';
|
||||
modelStyle: string = 'B';
|
||||
appType: string = 'free';
|
||||
icons: string = 'camera';
|
||||
isDisabled: boolean = true;
|
||||
|
||||
myForm;
|
||||
myForm: any;
|
||||
|
||||
constructor(fb: FormBuilder) {
|
||||
this.myForm = fb.group({
|
||||
@ -35,8 +33,10 @@ class MyApp {
|
||||
console.log("Segment selected", segmentButton.value);
|
||||
}
|
||||
|
||||
doSubmit(event) {
|
||||
doSubmit(ev) {
|
||||
console.log('Submitting form', this.myForm.value);
|
||||
event.preventDefault();
|
||||
ev.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EApp);
|
||||
|
@ -1,13 +1,15 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {Validators, Control, ControlGroup} from '@angular/common';
|
||||
import {App, Page, NavController} from '../../../../../src';
|
||||
import {ionicBootstrap, NavController} from '../../../../../src';
|
||||
|
||||
|
||||
@Page({
|
||||
@Component({
|
||||
templateUrl: 'main.html',
|
||||
})
|
||||
class SegmentPage {
|
||||
constructor(nav: NavController) {
|
||||
this.nav = nav;
|
||||
signInType: string;
|
||||
|
||||
constructor(public nav: NavController) {
|
||||
this.signInType = 'new';
|
||||
}
|
||||
|
||||
@ -16,7 +18,7 @@ class SegmentPage {
|
||||
}
|
||||
}
|
||||
|
||||
@Page({
|
||||
@Component({
|
||||
template: `
|
||||
<ion-navbar *navbar hideBackButton>
|
||||
<button menuToggle>
|
||||
@ -38,12 +40,11 @@ class SegmentPage2 {
|
||||
}
|
||||
|
||||
|
||||
@App({
|
||||
pages: [SegmentPage],
|
||||
@Component({
|
||||
template: `<ion-nav [root]="root"></ion-nav>`
|
||||
})
|
||||
class MyApp {
|
||||
constructor() {
|
||||
this.root = SegmentPage;
|
||||
}
|
||||
class E2EApp {
|
||||
root = SegmentPage;
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EApp);
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {Component, ViewChild} from '@angular/core';
|
||||
import {Validators, Control, ControlGroup} from '@angular/common';
|
||||
import {Http} from '@angular/http';
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {App, Page, NavController, Slides} from '../../../../../src';
|
||||
import {ionicBootstrap, NavController, Slides} from '../../../../../src';
|
||||
|
||||
|
||||
@Page({
|
||||
@Component({
|
||||
templateUrl: 'main.html',
|
||||
})
|
||||
class SegmentPage {
|
||||
@ -48,13 +48,11 @@ class SegmentPage {
|
||||
}
|
||||
|
||||
|
||||
@App({
|
||||
@Component({
|
||||
template: `<ion-nav [root]="root"></ion-nav>`
|
||||
})
|
||||
class MyApp {
|
||||
class E2EApp {
|
||||
root = SegmentPage;
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EApp);
|
||||
|
Reference in New Issue
Block a user