I'm coming over from React into Angular for the first time and trying to get used to it. How do I execute a separate click event only for the item I want to and not every item in my JSON list?

The Logout() Service works. If I dont; use an ngFor and pass the click event directly to the template it does what it's supposed to do. But not when I pass it from a JSON in an ngFor. I suppose I can always go back to the other way, but now I am curious. Funny thing is, I added an alert() and the event is firing, just not the AuthService in the logout function...

**Template**

```
<a
   *ngFor="let usermenuitem of usermenu; let i = index"
   [routerLink]="usermenuitem.link"
   (click)="usermenuitem.goto()">
   {{usermenuitem.title}}
</a>

```

Component

```
export class AuthorisedTopNavComponent implements OnInit {

  usermenu:Object[] = [
    {
      title: 'Account',
      link: '/account',
      icon:"ua-home.svg",
      goto: ()=>{},
    },
    {
      title: 'Membership',
      link: '/membership',
      icon:"ua-home.svg",
      goto: ()=>{},
    },
    {
      title: 'Logout',
      link: '/',
      icon:"ua-home.svg",
      goto: this.logoff,
    },
  ]

  constructor (
    public authService: AuthService
  ) {}  

  ngOnInit() {}

  logoff() {
    this.authService.logout('/');
  }

}

```