1- # Angular Routing
1+ # Angular Component Router
22
33[ ![ npm version] ( https://img.shields.io/npm/v/angular-routing.svg )] ( https://www.npmjs.com/package/angular-routing )
44
1515Use your package manager of choice to install the package.
1616
1717``` sh
18- npm install angular-routing
18+ npm install @ angular-component/router
1919```
2020
2121OR
2222
2323``` sh
24- yarn add angular-routing
24+ yarn add @ angular-component/router
2525```
2626
2727## Installation with ng add
2828
2929You can use ng add to install the package by using the command below.
3030
3131``` sh
32- ng add angular-routing
32+ ng add @ angular-component/router
3333```
3434
35- The above command will install the package, and add the RoutingModule import in the AppModule.
35+ The above command will install the package, and add the ComponentRouterModule import in the AppModule.
3636
3737## Usage
3838
39- To register the Router, add the ` RoutingModule .forRoot()` to your AppModule imports.
39+ To register the Router, add the ` ComponentRouterModule .forRoot()` to your AppModule imports.
4040
4141``` ts
42- import { RoutingModule } from ' angular-routing ' ;
42+ import { ComponentRouterModule } from ' @ angular-component/router ' ;
4343
4444@NgModule ({
4545 imports: [
4646 // ... other imports
47- RoutingModule .forRoot (),
47+ ComponentRouterModule .forRoot (),
4848 ],
4949})
5050export class AppModule {}
@@ -53,12 +53,12 @@ export class AppModule {}
5353Or in a feature module
5454
5555``` ts
56- import { RoutingModule } from ' angular-routing ' ;
56+ import { ComponentRouterModule } from ' @ angular-component/router ' ;
5757
5858@NgModule ({
5959 imports: [
6060 // ... other imports
61- RoutingModule ,
61+ ComponentRouterModule ,
6262 ],
6363})
6464export class FeatureModule {}
@@ -170,7 +170,7 @@ To navigate from a component class, or get global route information, such as the
170170
171171``` ts
172172import { Component } from ' @angular/core' ;
173- import { Router } from ' angular-routing ' ;
173+ import { Router } from ' @ angular-component/router ' ;
174174
175175@Component ({... })
176176export class MyComponent {
@@ -201,7 +201,7 @@ To get the route params, inject the `RouteParams` observable. Provide a type for
201201
202202``` ts
203203import { Component } from ' @angular/core' ;
204- import { RouteParams } from ' angular-routing ' ;
204+ import { RouteParams } from ' @ angular-component/router ' ;
205205
206206@Component ({... })
207207export class MyComponent {
@@ -221,7 +221,7 @@ To get the route params, inject the `QueryParams` observable. Provide a type for
221221
222222``` ts
223223import { Component } from ' @angular/core' ;
224- import { QueryParams } from ' angular-routing ' ;
224+ import { QueryParams } from ' @ angular-component/router ' ;
225225
226226@Component ({... })
227227export class MyComponent {
@@ -260,7 +260,7 @@ Register a component to register the child routes.
260260
261261``` ts
262262import { NgModule , Component } from ' @angular/core' ;
263- import { ModuleWithRoute } from ' angular-routing ' ;
263+ import { ModuleWithRoute } from ' @ angular-component/router ' ;
264264
265265@Component ({
266266 template: `
0 commit comments