Browse Source

docs: update config-state.md

pull/3788/head
mehmet-erim 7 years ago
parent
commit
6a4e481fe6
  1. 12
      docs/en/UI/Angular/Config-State.md

12
docs/en/UI/Angular/Config-State.md

@ -236,7 +236,7 @@ const newRoute: ABP.Route = {
path: "page", path: "page",
invisible: false, invisible: false,
order: 2, order: 2,
requiredPolicy: "MyProjectName::MyNewPage" requiredPolicy: "MyProjectName.MyNewPage"
}; };
this.config.dispatchAddRoute(newRoute); this.config.dispatchAddRoute(newRoute);
@ -248,23 +248,25 @@ The `newRoute` will be placed as at root level, i.e. without any parent routes a
If you want **to add a child route, you can do this:** If you want **to add a child route, you can do this:**
```js ```js
import { eIdentityRouteNames } from '@abp/ng.identity';
// this.config is instance of ConfigStateService // this.config is instance of ConfigStateService
const newRoute: ABP.Route = { const newRoute: ABP.Route = {
parentName: "AbpAccount::Login", parentName: eIdentityRouteNames.IdentityManagement,
name: "My New Page", name: "My New Page",
iconClass: "fa fa-dashboard", iconClass: "fa fa-dashboard",
path: "page", path: "page",
invisible: false, invisible: false,
order: 2, order: 2,
requiredPolicy: "MyProjectName::MyNewPage" requiredPolicy: "MyProjectName.MyNewPage"
}; };
this.config.dispatchAddRoute(newRoute); this.config.dispatchAddRoute(newRoute);
// returns a state stream which emits after dispatch action is complete // returns a state stream which emits after dispatch action is complete
``` ```
The `newRoute` will then be placed as a child of the parent route named `'AbpAccount::Login'` and its url will be set as `'/account/login/page'`. The `newRoute` will then be placed as a child of the parent route named `eIdentityRouteNames.IdentityManagement` and its url will be set as `'/identity/page'`.
#### Route Configuration Properties #### Route Configuration Properties
@ -291,4 +293,4 @@ Please refer to `Config.Environment` type for all the properties you can pass to
## What's Next? ## What's Next?
* [Component Replacement](./Component-Replacement.md) - [Modifying the Menu](./Modifying-the-Menu.md)
Loading…
Cancel
Save