Looking for the best way to update the list.
I want to refresh just the data section of the router.
app.router.refreshPage() = I can not use.
routher.js
var routes = [
// Index page
{
path: '/home/',
componentUrl: 'pages/home.html',
name: 'home',
},
// Profile page
{
path: '/profile/',
componentUrl: 'pages/profile.html',
name: 'profile',
},
// Badge page
{
path: '/badge/',
async (routeTo, routeFrom, resolve, reject) {
if (bag.length != 0) {
resolve({
componentUrl: 'pages/badge.html',
});
} else {
app.toast.create({
text: '<i class="icon f7-icons">alert</i> Sepetiniz Boş',
position: 'center',
closeTimeout: 2000,
}).open();
}
},
/* componentUrl: 'pages/badge.html',*/
name: 'badge',
},
];
badge.html (data)
<div class="list no-margin-top">
<ul>
{{#each product}}
<li>
<a href="#" class="item-content">
<div class="item-media"><i class="f7-icons">placemark_fill</i></div>
<div class="item-inner">
<div class="item-title">
<div class="item-header">{{this.name}}</div>
<span>9 TL</span>
</div>
<div class="item-after"><i class="f7-icons badge-pro-add" data-pro="{{this.id}}">add</i></div>
</div>
</a>
</li>
{{/each}}
</ul>
</div>
<script>
return {
data: function() {
return {
names: proListGet(),
product: productGet(),
}
},