@LuckyWolf19 wrote:
Hello fellow Ionicans!
Just wondering if anyone has a good example of how to update a list one component from a navigated to component.
Scenario:
- Component/Page which contains a list of somethings, say puppies obtained from a rest service component.
- When you click on a puppy in the list, the nav.push occurs to load the puppy detail page passing the puppyId.
- The puppy detail page loads showing the puppy's details.
- You change the puppy's title and click save.
- You then click back button to return to the list page.
- The list page should now be updated to show the new puppy's name. Without having to make a new call to the rest service.
Question: How do we update the list with the new puppy name from the puppy detail page?
Bonus Question: How do we add a new puppy to the list from the puppy detail page?
I have looked at events, @Inject and DI, but not able to get these to work making me think I am way off base or the examples are for pre-version I am using.
Thanks for any help and I hope to return it to you soon.
Posts: 2
Participants: 2