I want to generate buttons dynamically in my `html` template from an array of objects, like this:

**typescript**

```
private buttons: ButtonType[] = [];

ngOnInit(){

    let button: ButtonType = new ButtonType();

    button.name = "HOMEPAGE";
    button.clazz = "btn-blue";
    button.action = "goHome()";
    this.buttons.push(button);
  }

private goHome() {
    this.router.navigate(["/"]);
  }

```

**html**

```
<button *ngFor="let b of buttons" type="button" [class]="b.clazz" (click)="b.action">{{b.name}}</button>

```

Seems to work well except for the `action` part, that does nothing. It's not rendered at all the `(click)` part. Is there a binding way to make the `b.action` parameter interpreted as a method, as it would be if I write `(click)="goHome()"` inside the `html` page?