Category : angular-routing

I have code where i want to redirect user to new path with a unique UD as soon as user hits root. (localhost:4200). but i get this error ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘document/4fdb309b-df59-4da8-a32d-5265f7925bba’ Error: Cannot match any routes. URL Segment: ‘document/4fdb309b-df59-4da8-a32d-5265f7925bba’ Below if my router module code ..

Read more

I want to redirect user to a path with a unique UUID when they hit root (localhost:4200). But I get this error ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘document/4fdb309b-df59-4da8-a32d-5265f7925bba’ Error: Cannot match any routes. URL Segment: ‘document/4fdb309b-df59-4da8-a32d-5265f7925bba’ Below is my router module code segment import { v4 as uuidv4} ..

Read more

I am currently trying to implement an auth system, And in my system user cannot go to login page if it is logged. For this I created a guard on /auth currently I am using observables inside guard. import {Injectable} from ‘@angular/core’; import {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from ‘@angular/router’; import {Observable, of} from ‘rxjs’; import ..

Read more

I am serving a static html file from Angular. I added it to "assets" in angular.json. “ "assets": [ { "glob": "**/*", "input": "src/app/webhelp", "output": "/help/" } ],“ Route works well on local development. However on production build it is unable to find route match. https://localhost:3001/help >> works well On prod build it navigates to ..

Read more

I have problem with second router outlet when it’s created in lazy loaded module. I started with this example where auxiliary routes https://stackblitz.com/edit/angular-nested-auxiliary-routes-irixxy work correctly. My app is a bit more complicated and I use lazy loaded modules. In new module I wanted to use second router-outlet to dynamically show components. But I found out ..

Read more