I am doing a refactor on my app and I want to have the p-dialog in a component but the content of (including header and footer) of the p-dialog in another component.
Code: Select all
<p-dialog
[(visible)]="show"
[style]="{ width: '500px' }"
[draggable]="false"
[modal]="true"
>
<app-tag-form></app-tag-form>
</p-dialog>
Code: Select all
<ng-template pTemplate="header">
<h1 translate>PAGES.TAGS.TITLE</h1>
</ng-template>
<form novalidate autocomplete="off" [formGroup]="form" #tagForm="ngForm">
...
</form>
<ng-template pTemplate="footer">
<button
pButton
label="{{ 'PAGES.TAGS.SAVE' | translate }}"
(click)="save()"
[disabled]="form.invalid"
pRipple
></button>
</ng-template>
How can I make it work?
Thanks!