Top "Angular2-routing" questions

Angular Routing is a built-in feature that enables you to create a Single Page Application (SPA) user interface, where users can navigate to different views without having to reload the entire page from the server every time.

No provider for ActivatedRoute - Angular 2 RC5

After upgrading to Angular 2 RC5 (from RC4) it seems I can no longer inject ActivatedRoute into my components. ORIGINAL EXCEPTION: …

angular angular2-routing angular2-router3
How to Redirect to a certain route based on condition in Angular 2.

I am creating one angular2-meteor app. export const routes: Route[] = [{ path: '', redirectTo: "login", pathMatch: "full" }, { path: 'login', component: …

angular angular2-routing angular2-meteor
CanActivate vs. CanActivateChild with component-less routes

The angular2 documentation about Route Guards left me unclear about when it is appropriate to use a CanActivate guards vs. …

angular angular2-routing
How can I access an activated child route's data from the parent route's component?

const appRoutes: Routes = [ { path: 'parent', component: parentComp, data: { foo: 'parent data' }, children: [ { path: 'child1', component: childComp1, data: { bar: 'child …

angular angular2-routing
Routing With ID in Angular 4

I need help in my routing in Angular 4. I want to display the URL like this. Localhost:4200/user/1 if i …

angular angular2-routing angular-router
Error: Cannot match any routes. URL Segment: ''

I'm trying to reproduce my problem with Angular2 router but i cannot create a working copy of my project in …

angular url-routing angular2-routing plunker angular2-router3
Does angular2 support nested states/routes?

Does angular2 support nested states/routes? for example in a view port there are 2 links and on clicking a specific …

routes angular angular2-routing
Retrieve hash fragment from url with Angular2

Given this url structure (over which I have no control), how can I retrieve the hash fragment using Angular2? http://…

typescript angular2-routing
Angular2 routing canActivate and AuthGuard (JWT) with user role parameter

In this exaple project with JWT authentication we se how to allow only authenticated users to some route: import { RouterConfig } …

javascript authentication angular roles angular2-routing
Angular 4 - Route query params cause path match failure

After searching multiple threads/questions on the various types of routing within Angular 4, I cannot resolve an issue linked to …

angular angular2-routing url-encoding query-parameters