简体   繁体   中英

How to update data in Onsen UI (angularjs)

I am working in an app with onsen ui + phonegap. Then I have a page that user click to favorite the post. This page has the last 4 photos of people who favorited the post recently. Then I already add the class "active" to button favorite. But now the problem: How can I update data of last 4 people who favorited the post to appear the user photo? This data is in an angular service. And this is how I get it in template:

<ons-col ng-repeat="pe in people | limitTo: 4">

Does someone can help me?

Thanks

I guess you are using ons-navigator . If you are pop ing a page, the previous page would not be created from scratch.

If you need to recreate the previous page, pass {refresh: true} as a parameter to the nav.popPage .

nav.popPage({refresh: true});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM