Web Page
Web Component
Angular
Component
ngZone
Angular App (ngZone)
Ionic Component
// zone-flag.ts
(window as any).__Zone_disable_customElements = true;
// polyfills.ts
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import './zone-flag';
import 'zone.js/dist/zone'; // Included with Angular CLI.
removeItem() {
this.alertController
.create({
header: 'Delete?',
message: 'Do you want to delete the last item ?',
buttons: [
{
text: 'Yes',
handler: () => {
setTimeout(() => {
this.itemlist.splice(this.itemlist.length - 1, 1);
this.itemlist = [...this.itemlist];
}, 500);
}
},
{
text: 'Cancel',
role: 'cancel'
}
]
})
.then(alert => {
alert.present();
});
}
Angular App (ngZone)
Ionic Component
Stencil (global eventListener)