-
Notifications
You must be signed in to change notification settings - Fork 0
SLG Router
alx-net edited this page Jun 14, 2024
·
4 revisions
SLGRouter is the class which handles navigation within our app. The instance of this class manages all the pages in the app by putting them into an dictionary with a string as key and page as value. Everything this Router does is showing and hiding pages.
Route String | Page Instance |
---|---|
/home | SLGHomePageView instance |
/home/Data Types | SLGTopicPageView instance with "Data Types" data |
... | ... |
- We show only one page at the time
- The Route string can be an arbitrary string of any format
Route to a specific page:
navigateTo: "/home"
All pages have access to the navigateTo: ...
method.
The router is passed as part of SLGMainController
to all the pages.