Hi,
I want to have a specific sub-menu expanded by default on load, but so far it seems I miss something.
Visibility is working fine, but with the expanded property I do not get it to work.
Any idea how to accomplish this are welcome.
Thank you.
Expand sub menu by default
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
Hi,
Firstly, please add expanded: true in menu model;
Secondly, add child.expanded near isActive in 484th line;
Lastly, add child.expanded near isActive in 513th line;
Firstly, please add expanded: true in menu model;
Code: Select all
//other codes
{label: 'User Profile', icon: 'pi pi-fw pi-user', badge: 2, expanded: true,
//other codes
Code: Select all
<li [ngClass]="{'layout-root-menuitem':root ,'active-menuitem': isActive(i) || child.expanded }" [class]="child.badgeStyleClass"
Code: Select all
'visible' : 'hidden' : isActive(i) || child.expanded ? 'visibleAnimated' :
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest