ABP provides a component that wraps your content with some built-in components to recude the amount of code you need to write.
ABP provides a component that wraps your content with some built-in components to reduce the amount of code you need to write.
If the template of a component looks like as follows, you can utilize the `abp-page` components.
If the template of a component looks as follows, you can utilize the `abp-page` component.
E.g.
@ -22,13 +22,21 @@ E.g.
</div>
<divid="app-id">
<!--....-->
<!--app content here-->
</div>
```
## Page Parts
PageComponent divides the template shown above into three parts, `title`, `breadcrumb`, `toolbar`. Each can be configured separately.
PageComponent divides the template shown above into three parts, `title`, `breadcrumb`, `toolbar`. Each can be configured separately. There, also, is an enum exported from the package that describes each part.
```javascript
export enum PageParts {
title = 'PageTitleContainerComponent',
breadcrumb = 'PageBreadcrumbContainerComponent',
toolbar = 'PageToolbarContainerComponent',
}
```
## Usage
@ -65,7 +73,7 @@ And change the template of `app.component.ts` to the following:
## Overriding template
If you need to replace the template of any part, you can use following sub components.
If you need to replace the template of any part, you can use the following sub-components.
```html
<abp-page>
@ -111,15 +119,7 @@ It also can take a context input as follows:
</div>
```
```javascript
enum PageParts {
title = 'PageTitleContainerComponent',
breadcrumb = 'PageBreadcrumbContainerComponent',
toolbar = 'PageToolbarContainerComponent',
}
```
It's render strategy can be provided through Angular's Depedency Injection system.
Its render strategy can be provided through Angular's Dependency Injection system.
It expects a service through the `PAGE_RENDER_STRATEGY` injection token that implements the following interface.