Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Multiple parameters in in Pipe using ngclass in angular

I’m calling the pipe on li

 <li [ngClass]="time | style">

In Pipe using value as first parameter

 transform(value: any, args: any[]): any {

i want to pass second parameter also after time.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

i tried to pass like this

 <li [ngClass]="time : secondparam | style"..

but this is not working

Any solution to fix this issue

Thanks

>Solution :

You can pass as many as parameters

<li [ngClass]="time | style: args">

if you have more then would be like

<li [ngClass]="time | style: first:second:third"> and so on

Here is the official documentation

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading