mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 02:31:34 +08:00
fix(modal-controller): initialize ids
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import { Component, Listen, Method } from '@stencil/core';
|
import { Component, Listen, Method } from '@stencil/core';
|
||||||
import { Modal, ModalEvent, ModalOptions } from '../../index';
|
import { Modal, ModalEvent, ModalOptions } from '../../index';
|
||||||
|
|
||||||
let ids: 0;
|
let ids = 0;
|
||||||
const modals = new Map<number, Modal>();
|
const modals = new Map<number, Modal>();
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -38,16 +38,9 @@
|
|||||||
// create component to open
|
// create component to open
|
||||||
const element = document.createElement('ion-page');
|
const element = document.createElement('ion-page');
|
||||||
element.innerHTML = `
|
element.innerHTML = `
|
||||||
<ion-header>
|
<div style="height: 500px; background-color: red">
|
||||||
<ion-toolbar>
|
|
||||||
<ion-title>Cool Modal</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-header>
|
|
||||||
<ion-content padding>
|
|
||||||
<h1>Super content</h1>
|
|
||||||
<div>Additional content</div>
|
|
||||||
<ion-button>Close the modal</ion-button>
|
<ion-button>Close the modal</ion-button>
|
||||||
</ion-content>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// listen for close event
|
// listen for close event
|
||||||
|
Reference in New Issue
Block a user