Mobile Account Routes Not Working
Problem
- On mobile, the
Sign Up
link did not work and threw an error. Upon further investigation, this was true of all links associated with the account route. - I discovered the Account routes did not work when I imported
AccountRoutingModule
into 'account.module.tns.ts` because several routes used on desktop were not used on mobile. - Interestingly, it seems to be an assumption of NativeScript that Navigation is shared (https://docs.nativescript.org/angular/code-sharing/intro)
Solution
- I separated the account routes in
account.common.ts
intosharedRoutes
anddesktopRoutes
so I could keep them contained in the same file (yay no code repeating). As an added bonus, it will be easy to move routes around as we add more desktop features to mobile. - I created a new account-routing module specifically for mobile that only called the account routes it used (
sharedRoutes
) - This solved the problem by separating out the routes desktop needed vs mobile while not breaking the convention of having all the routes in the same place.
Closes #237 (closed)