I can’t call the “dialog” on pages other than index.html!
thank you for your help!
App.js
pps
March 20, 2020, 2:05am
4
You need to insert script below html
<script>
return{
on:{
pageInit:function(){
var self = this;
var app = self.$app;
var $ = self.$;
$$('.open-alert').on('click',function(){
// Your function
});
}
}
}
</script>
This may work!!!
further take look at:
<template>
<div class="page">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner sliding">
<div class="left">
<a href="#" class="link back">
<i class="icon icon-back"></i>
<span class="if-not-md">Back</span>
</a>
</div>
<div class="title">Dialog</div>
</div>
</div>
<div class="page-content">
<div class="block block-strong">
<p>There are 1:1 replacements of native Alert, Prompt and Confirm modals. They support callbacks, have very easy api and can be combined with each other. Check these examples:</p>
<p class="row">
<button class="col button button-fill" @click="openAlert">Alert</button>
<button class="col button button-fill" @click="openConfirm">Confirm</button>
This file has been truncated. show original
pps:
It doesn’t seem to work, even copying all the code and replacing the event is not called!