From c25087ae06157d4985942ef44572a196370efae2 Mon Sep 17 00:00:00 2001 From: Zhicheng WANG Date: Thu, 20 Dec 2018 09:56:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=81=97=E6=BC=8F=E7=9A=84=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/router.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md index f6bec7f28e..94bdd883c0 100644 --- a/aio/content/guide/router.md +++ b/aio/content/guide/router.md @@ -1363,6 +1363,8 @@ Replace the contents of each component with the sample HTML below. ### Register Router and Routes +### 注册路由器与路由定义 + In order to use the Router, you must first register the `RouterModule` from the `@angular/router` package. Define an array of routes, `appRoutes`, and pass them to the `RouterModule.forRoot()` method. It returns a module, containing the configured `Router` service provider, plus other providers that the routing library requires. Once the application is bootstrapped, the `Router` performs the initial navigation based on the current browser URL. 要使用路由器,必须先注册来自 `@angular/router` 包中的 `RouterModule`。