angular-routing Questions

1

I have multiple angular components which all contain a different IFrame. The problem I have is that when I navigate in my application, it triggers a reload of the IFrames. Is there a way to persist...
Annamarieannamese asked 14/2, 2018 at 16:53

2

Solved

I have an Angular project with 3 components country, region, home. When I load the home page, I have route setup to HomeComponent, which hyperlinks for routes. Everything works just fine and behavi...
Encrust asked 21/11, 2018 at 16:46

16

Let's suppose I've got 3 urls: /:projectId/info, /:projectId/users, /:projectId/users/:userId/profile. All of them have param projectId. UI has a component to switch from one project to another. So...
Detent asked 10/6, 2018 at 13:42

3

Solved

After successful login, user navigate to home page. but when page is refreshed, login page flashes for a second. Most probably the reason is, same page is rendering on server-side 1st, then on Clie...

6

Solved

I currently have a route guard such as export class EntityGuard implements CanActivate { constructor(private readonly router: Router, ...) {} canActivate( route: ActivatedRouteSnapshot, state...
Cofsky asked 29/4, 2019 at 13:49

4

Solved

Version Used Angular version : 7.10 @angular/router": "~7.2.0", The question is Why angular adds a hashTag to the url. Example case: const routes: Routes = [ { path: 'aktion', component:...
Beeeater asked 6/2, 2019 at 11:14

6

Recently I have heard about a property called onSameUrlNavigation where you can set it to "reload". I have googled about it but there are not many articles which shows the use of that property. Can...
Grandioso asked 6/1, 2019 at 14:0

8

Solved

I have a route registered with some data: const routes: Routes = [ {path: 'my-route', data: { title: 'MyTitle' }, component: MyComponent}, ]; and I'm trying to access to the route's data usi...
Azine asked 17/8, 2017 at 14:6

7

Solved

In Ionic 3 you could use the second argument of the navController to pass data to the next page and retrieve it with the navParams service. This was a really convenient feature. Is there an equiva...
Mirador asked 5/9, 2018 at 14:13

2

Solved

I was wondering if there is a way to retrieve the current route in an HttpInterceptor in Angular. I am using the same interceptor from different routes, but I need to check if the interceptor is be...

4

Solved

What is the difference between ActivatedRouteSnapshot and ActivatedRoute in Angular 4? It's my understanding that ActivatedRouteSnapshot is a child of ActivatedRoute, meaning that ActivatedRoute co...
Friedman asked 5/9, 2017 at 8:54

5

Solved

From the Angular documentation on canActivate, it seems you can only use canActivate guards to allow proceeding to a route if the canActivate function ultimately returns true. Is there some way to...

7

I need for the same anchor link to be pointed conditionally locally or to external resource. I tried <a [href]="outside?externalUrl:null" [routerLink]="outside?[]:['/route',id]" >test<...
Carson asked 9/6, 2017 at 4:12

1

Solved

I'm implementing a functional router guard in Angular 15.2.9 which checks if a user is logged in. When this is not the case, the guard should return either false or a UrlTree (i.e. redirect to logi...

6

I use angular 9 and I want to do lazy load and I do app-routing { path: '', loadChildren: () => import("./components/login/login.module")//.then(m => // m.LoginModule) } and after I cre...
Rudder asked 5/5, 2020 at 13:44

2

Solved

I am new to Angular and refer to the below questions, but there isn't any solution for my case. NullInjectorError: No provider for MatDialogRef NullInjectorError: No provider for MatDialogRef! Ang...
Mosby asked 21/7, 2023 at 6:36

6

I have an issue with using routing navigate method of angular. I have two components : LoginComponent and HomeComponent. When I click on the button in "login.component.html", I want to be redirect...
Quant asked 19/5, 2018 at 17:26

2

When using angular < 16, I used to have this routes configuration: { path: Section.Security, canActivate: [AuthGuard, AccessGuard, AdminGuard], children: [ { path: '', pathMatch: 'full', ...
Radioman asked 4/5, 2023 at 8:2

3

Solved

I have a problem with filling all available space with the router-outlet. I use angular/flex-layout for my application. And the component loaded with the router doesn't take all available place. ...

3

Solved

I was doing the angular Tour-hero project(replaced Hero with 'User'). There when I made the Hero(User) and Hero-detail(User-detail) separate and when I tried to access the details, it is not showin...

2

Solved

Usually I'd go like this in my component. import { Router } from "@angular/router"; @Component({ ... }) export class CompyTheComponent { constructor(private router: Router) { console.log(route...
Bluenose asked 22/8, 2017 at 17:44

5

Solved

I have component with separated file of routing settings: import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { Route } from '../core/route.se...
Watchmaker asked 14/8, 2017 at 7:0

7

Solved

How to open a new browser Tab , if using router.navigate . this.router.navigate([]).then(result => { window.location.href = link; });
Gorget asked 25/5, 2018 at 4:19

3

I'm tying to get the child route data('layout') from parent component using ActivatedRoute. I have tried the following example and I'm able to get the data I'm looking for but only for one time. Du...

9

Solved

I Have an Angular application. I run the command ng build --prod --aot to generate the dist folder. In the dist folder I created a file named Staticfile then I uploaded the dist folder to pivotal.i...
Antoninaantonino asked 24/8, 2017 at 10:15

© 2022 - 2024 — McMap. All rights reserved.