.ts code
buttonDetials: any;
constructor(private api: ApiService) {
this.buttonDetials = [
{ label: "Add", icon: "add", color: "warning", onclick: function() {console.log('Hello Add')}},
{ label: "Close", icon: "close", color: "warning", onclick: function() {console.log('Hello Close')} },
{ label: "Approve", icon: "checkmark", color: "warning", onclick: function() {console.log('Hello Approve')} }
];
}
func(details) {
details.onclick();
}
.html code
<ul>
<li *ngFor="let details of buttonDetials">
<ion-fab right bottom>
<ion-fab-button color='details.color' (click)="func(details)">
<ion-icon name="details.icon"></ion-icon>
</ion-fab-button>
</ion-fab>
</li>
</ul>
console