I'm having an issue with routing to a route with query params I have a function like so  goToLink(link) {     this.router.navigate([`${link.split('?')[0]}`, { queryParams: this.sortParams(link)}]); }   and this function  sortParams(link)...
I'm using multiple named angular 8 router-outlet in a web app. All the routerLink seems to work as it changes the URL but components in my 2nd router-outlet are imported but not initialized nor rendered.    I made a Stackblitz available here : ht...
I'm upgrading from Angular 4.0.0 to Angular 5.2.6  i'm facing some problem to get lazy module loading working.  with angular 4.0.0 , it works fine , but now , with 5.2.6 , i getting such an error when clicking my redirecting button :  core.js...
I'm trying to test an Angular Resolver which accesses children routes param.  My guard works fine but I cannot create an unit test easily because I cannot create an ActivatedRouteSnapshot with children routes (read only property).   My resolver...
I need to pass data to a dynamically created angular module like an id or JSON my controller code is like this.   Logic Explained - The API provides the layout of the page if primary module comes first or secondary module (There are more which cannot...
Playing around with the stackblitz starting point and I added the following routing:      const routes : Routes = [ {path: 'hello', 'component': HelloComponent}];       @NgModule({       imports:      [          RouterModule.forRoot(r...
In my current logout call, I have something like this:   getLogoutConfirmation(){    // get confirmation in modal and perform logout    // redirect to login page  }   Issue is, when logout is performed and redirect to login is called, the canDeactiva...
I am trying to build a map-centric app similar to google maps. So there is mainly a map, and depending on the url route, a component is loaded inside a small side-panel.  export const routes: Routes = [     {path: 'home/:coordinates', compone...
In the Angular 2+ (4) routing tutorial, it shows to make the router a private member, e.g:  constructor(     private router: Router, // <- router is private     private heroService: HeroService) { }     ... ) {}   But it doesn't provide any ex...
I need to fetch my current route (using the Router) in a component (my Nav component) which is located in the App Component but as it's already loaded, it's not refreshing on a click and my function in the nav component isn't returning an...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.