Lets say I want to trigger functions foo and bar by a PrimeNG SplitButton. Both have one parameter regarding the button itself.
Regarding the action I want to have parameter for the assigned function.
I can do it for foo because I set it with onClick.
But how can I do it for bar??
<p *ngFor="let x of ['aaa','bbb','ccc']">
<p-splitButton label="FOO for {{x}}" (onClick)="foo (x)" [model]="cmds"></p-splitButton>
</p>
cmds : any = [{label: "BAR for x", command: () => { bar (x); }}]; // x is not here, how can I get it?