I know that v4 its still in beta but some things about the navigation docs have confused me a little.
-
will the NavController be deprecated ? Y/N ?
In the doc it says " In v4, major changes were made to navigation and routing.NavController
andion-nav
have now been deprecated. They can still used, but only if an app is not using lazy loading." -
how i can reset the nav stack to remove the back button? i.e. setting the homepage as root
Using the router this didn’t worked:
this.router.navigate(['/auth/home'], { replaceUrl: true });
I had to use the NavController:
this.nav.navigateRoot('/auth/home');
- is it ok to use the Location service from angular to go back ?
import {Location} from '@angular/common';
this.location.back();