Chau Tran
Chau Tran

Reputation: 5088

Angular Material ("@angular/material": "^5.0.0-rc0") mat-accordion with multiple components' selectors

I am working on an Angular 5 application where I have to load multiple components dynamically based on what components the user pick to display using ComponentFactoryResolver. In each component template, I have mat-expansion-panel. After the components are loaded dynamically, it looks like a "normal" Accordion. However, mat-accordion won't work as it allows the user to open multiple expansion-panel at the same time.

My Plunker to demonstrate my question: Plunker example

Angular Material's Documentation Plunker: Angular Material Plunker Example

Is there a way to have my example's accordion behaves like the Angular Material's example's accordion?

Thanks

EDIT: I have tried multi input which is default to false.

Upvotes: 1

Views: 1450

Answers (1)

manojadams
manojadams

Reputation: 2430

multi="true" needs to be set at mat-accordion level for this to work.
e.g-> mat-accordion multi="true"

Upvotes: 2

Related Questions