我已经创建了一个离子4应用程序。
我所做的,
- I have disabled the menu at first on app.component.ts
- When ionViewWillEnter() on Map Tab, I have disabled the side-menu
- When ionViewWillLeave() on Map Tab, I have disabled the side-menu
- Side-menu only will enable when to click on the place marker
- I have triggered the event when clicking on place marker
- This event carries the data of place
- I have used the variable 'business' to fill the side-menu
- I have subscribed the event on app.component.ts and assign the
place data to 'business' variable问题:-
时
发布于 2019-11-11 13:55:12
“业务”变量的数据更新了吗?如果是这样,也许您可以尝试在ngzone中运行赋值代码。
// import zone in your app.component.ts
import { NgZone } from '@angular/core';
// add zone provider to the component constructor
constructor(private zone: NgZone) {
// ...
}
// cath click event, then
this.zone.run(() => {
// update data here
}); https://stackoverflow.com/questions/58802281
复制相似问题