I want to open tab on page load by default. Right now it is collapsed and to open accordion tab I have to click on the button. I do not want to click on button every time to open the tab.
<div><p-accordion >
<p-accordionTab header="Add Detail" >
<add-details [state]="'addNew'"></add-details>
</p-accordionTab>
</p-accordion>
</div>
Pulled from comment:
open]= true it is not working Uncaught Error: Template parse errors: Can't bind to 'open' since it isn't a known property of 'p-accordionTab'. 1. If 'p-accordionTab' is an Angular component and it has 'open' input, then verify that it is part of this module. 2. If 'p-accordionTab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<div><p-accordion >
ngAfterViewInit()
lifecycle hook. – Ashish RanjanInput() open
property in your PAccordionTabComponent and then call it with<p-accordionTab header="Add Detail" [open]="true">
– Bernard Pagoaga