Angular UI Router: Different states with same URL? The landing page of my app has two states: home-public, home-logged-in. Now I want to show both states on the same URL, but let the controller and template depend on the user session (is the user log…
Today we will be using AngularJS and the great UI Router and the Angular ngAnimate module to create an animated multi-step form. This technique can be used for large forms that you would like to simplify for your users. We can see this technique used…
Using the Angular 2 router requires defining routes, passing them in to the RouterModule.forRoot and then importing the configured RouterModule into your main App Module. Use the Wiki Search as example project. Create a HomeComponent to contain every…
In this tutorial we are going to learn how we can can configure redirects in the angular 2 router configuration. We are also going to see again another example on how the order of the configuration might trip us. We are going to see the different bet…
When we define router in Angualr 2, we use @RouteConcfig() When we want to display component, we use <router-outlet> When we want to navigate to component, we use [routerLink]="['routerName']" When we want to access router params, we use R…
To enable router tracing is really simple: RouterModule.forRoot(ROUTES, { enableTracing: true }) When we define the root RouterModule, we can pass the option "enableTracing". What we you get is when we navgiating thought app, we will get router…