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.

Angular 2 get current route in guard

I have an AccessGuard class in my project which its work is to determine if user can access to the …

angular angular2-routing angular2-guards
How to apply css class to a component element when it's created by router-outlet?

I have DOM that looks something like this: <app> <router-outlet></router-outlet> <project>...&…

angular angular2-routing
Using Resolve In Angular2 Routes

In Angular 1 my config looks like this: $routeProvider .when("/news", { templateUrl: "newsView.html", controller: "newsController", resolve: { message: function(messageService){ return …

angular angular2-routing
Angular2 get activated route parameters and parent parameters

How do I get the RouteParams from a parent component as well as child routes export const routes: Routes = [ { path: …

angular angular2-routing angular2-components
Angular 2 router resolve with Observable

After release of Angular 2 RC.5 there was introduced router resolve. Here demonstrated example with Promise, how to do the same …

angular angular2-routing rxjs5
Angular 2 Final Release Router Unit Test

How do I unit test routers in Angular version 2.0.0 with karma and jasmine? Here's what my old unit test looks …

javascript angular karma-jasmine angular2-routing angular2-testing
Share data between components using a service in Angular2

I am developing an application using angular2. I have a scenario where I need to pass complex data (array of …

angular angular2-routing angular2-components
Cannot read property 'outlets' of null

I have next problem : Cannot read property 'outlets' of null. My project works, but after some time it stopped working, …

angular angular2-routing
How to switch layouts in Angular2

What is the best practices way of using two entirely different layouts in the same Angular2 application? For example in …

angular angular2-routing
Angular router: how to replace param?

Let's suppose I've got 3 urls: /:projectId/info, /:projectId/users, /:projectId/users/:userId/profile. All of them have param projectId. UI …

angular angular2-routing angular-routing