Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(guide/Component Router): describe your change... #14237

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/content/guide/component-router.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -956,17 +956,17 @@ respectively.

**How do I prevent navigation from occurring?**

Each **Component** can provide the `$routerCanActivate` and `$routerCanDeactivate` **Lifecycle Hooks**. The
`$routerCanDeactivate` hook is an instance method on the **Component**. The `$routerCanActivate` hook is a
static method defined on either the **Component Definition Object** or the **Component's** constructor function.
Each **Component** can provide the `$canActivate` and `$routerCanDeactivate` **Lifecycle Hooks**. The
`$routerCanDeactivate` hook is an instance method on the **Component**. The `$canActivate` hook is used as a
static method defined on the **Component Definition Object**.

The **Router** will call these hooks to control navigation from one **Route** to another. Each of these hooks can
return a `boolean` or a Promise that will resolve to a `boolean`.

During a navigation, some **Components** will become inactive and some will become active. Before the navigation
can complete, all the **Components** must agree that they can be deactivated or activated, respectively.

The **Router** will call the `$routerCanDeactivate` and `$routerCanActivate` hooks, if they are provided. If any
The **Router** will call the `$routerCanDeactivate` and `$canActivate` hooks, if they are provided. If any
of the hooks resolve to `false` then the navigation is cancelled.

### Dialog Box Service
Expand Down