mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
@ -194,7 +194,9 @@ export class ModalCmp {
|
|||||||
this._compiler.resolveComponent(componentType).then((componentFactory) => {
|
this._compiler.resolveComponent(componentType).then((componentFactory) => {
|
||||||
let componentRef = this.viewport.createComponent(componentFactory, this.viewport.length, this.viewport.parentInjector);
|
let componentRef = this.viewport.createComponent(componentFactory, this.viewport.length, this.viewport.parentInjector);
|
||||||
this._renderer.setElementClass(componentRef.location.nativeElement, 'show-page', true);
|
this._renderer.setElementClass(componentRef.location.nativeElement, 'show-page', true);
|
||||||
this._renderer.setElementClass(componentRef.location.nativeElement, componentType.name, true);
|
// auto-add page css className created from component JS class name
|
||||||
|
let cssClassName = pascalCaseToDashCase(componentType.name);
|
||||||
|
this._renderer.setElementClass(componentRef.location.nativeElement, cssClassName, true);
|
||||||
this._viewCtrl.setInstance(componentRef.instance);
|
this._viewCtrl.setInstance(componentRef.instance);
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
done();
|
done();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, Config, Platform} from '../../../../../src';
|
|
||||||
import {Modal, ActionSheet, NavController, NavParams, PageTransition, TransitionOptions, ViewController} from '../../../../../src';
|
import { ActionSheet, Config, ionicBootstrap, Modal, NavController, NavParams, PageTransition, Platform, TransitionOptions, ViewController } from '../../../../../src';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
@ -25,7 +25,7 @@ class E2EPage {
|
|||||||
console.log('android', platform.is('android'));
|
console.log('android', platform.is('android'));
|
||||||
console.log('windows phone', platform.is('windows'));
|
console.log('windows phone', platform.is('windows'));
|
||||||
|
|
||||||
platform.ready().then((readySource) => {
|
platform.ready().then((readySource: string) => {
|
||||||
console.log('platform.ready, readySource:', readySource);
|
console.log('platform.ready, readySource:', readySource);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -73,7 +73,6 @@ class E2EPage {
|
|||||||
presentNavigableModal(){
|
presentNavigableModal(){
|
||||||
let modal = Modal.create(NavigableModal);
|
let modal = Modal.create(NavigableModal);
|
||||||
this.nav.present(modal);
|
this.nav.present(modal);
|
||||||
//this.nav.push(NavigableModal);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +89,8 @@ class E2EPage {
|
|||||||
</ion-content>
|
</ion-content>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
class NavigableModal{
|
class NavigableModal {
|
||||||
constructor(private navController:NavController){
|
constructor(private navController:NavController) {
|
||||||
}
|
}
|
||||||
|
|
||||||
submit(){
|
submit(){
|
||||||
@ -112,8 +111,8 @@ class NavigableModal{
|
|||||||
</ion-content>
|
</ion-content>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
class NavigableModal2{
|
class NavigableModal2 {
|
||||||
constructor(private navController:NavController){
|
constructor(private navController:NavController) {
|
||||||
}
|
}
|
||||||
|
|
||||||
submit(){
|
submit(){
|
||||||
|
Reference in New Issue
Block a user