Q5: 15 points, lonic parameter passing among pages
Describe the communication mechanisms in the following scenario of ionic app development
a) We have a Menus Page, and would like to implement a viewMenuDetail page, how should you pass
the menu information from Menus Page to the viewMenuDetail page. Write down the key code
statements
b) We have a Menus Page, and would like to implement a EditMenu page, how should you pass the
updated menu information from the EditMenuDetail page so that the Menus Page updates the
Menus list (e.g. with changed new menu name) without reloading all other menus. Write down the
key code to illustrate your idea.
c) We usually put all global data structures in a Service Moduel such as the ItemService. This is
achieved by defining some data attributes and related APIs for the ItemService. Explain (1) How
other Pages obtain access to the data and API of the ItemService? (2) How to achieve
synchronizations between the ItemService data and the data shown on the Pages? E.g. when a
order is added to the ItemService, the Orders Page should show it automatically.