Introduction
It's possible to write a simple app with a handful of pages. However, when the app grows, managing different views and their custom data at a specific time or a triggered event can be very complex. Ionic comes with UI-Router by default. So, you should leverage this advanced routing management mechanism. In general, the following holds true:
- A view should have its own state, which is basically a JSON object
- A route (URL) will point to a view and its assigned controller
- State and view should allow nested views so that you can manage the hierarchy
Since Ionic introduces many new components, you have to understand how those components impact your app's state hierarchy when each state is triggered.