@ -75,35 +72,55 @@ And change the template of `dashboard.component.ts` to the following:
## Overriding template
If you need to replace the template of any part, you can use the following sub-components.
If you need to replace the template of any part, you can use the following sub-components. You will need to import these components and modify the html template accordingly.
```html
<abp-page>
<abp-page-title-containerclass="col">
<h2>Custom Title</h2>
</abp-page-title-container>
<abp-page-breacrumb-containerclass="col">
<my-breadcrumb></my-breadcrumb>
</abp-page-breacrumb-container>
<abp-page-toolbar-containerclass="col">
<button(click)="doSth()">Some Action</button>
</abp-page-toolbar-container>
</abp-page>
```javascript
import {
PageComponent,
PageTitleContainerComponent,
PageBreadcrumbContainerComponent,
PageToolbarContainerComponent
} from '@abp/ng.components/page';
@Component({
selector: 'app-sample-component',
template: `
<abp-page>
<abp-page-title-containerclass="col">
<h2>Custom Title</h2>
</abp-page-title-container>
<abp-page-breacrumb-containerclass="col">
<my-breadcrumb/>
</abp-page-breacrumb-container>
<abp-page-toolbar-containerclass="col">
<button(click)="doSth()">Some Action</button>
</abp-page-toolbar-container>
</abp-page>
`
imports: [
PageComponent,
PageTitleContainerComponent,
PageBreadcrumbContainerComponent,
MyBreadcrumbComponent,
PageToolbarContainerComponent
]
})
export class SampleCompnent {}
```
You do not have to provide them all. You can just use which one you need to replace. These components have priority over the inputs declared above. If you use these components, you can omit the inputs.
## PagePartDirective
`PageModule` provides a structural directive that is used internally within `PageComponent` and can also be used externally.
`Components` package provides a structural directive that is used internally within `PageComponent` and can also be used externally.
`PageComponent` employs this directive internally as follows: