color: string;
                  
                  
                    text: string;
                  
                  
                    icon: string;
                  
                  
                    routerLink?: string;
                  
                  
                    click?: any;
                  
                  
                  }
                  
                  
                  
                  
                  
                  tiles: Tile[] = [
                  
                  
                      { text: '1', color: 'white', backgroundColor: '#fc960f', icon: 'show_chart', routerLink: '/' },
                  
                  
                      { text: '2', color: 'white', backgroundColor: '#49a54b', icon: 'show_chart', click: () => { this.onClick(); } },
                  
                  
                  ...
                  
                  
                    ];
                  
                  
                  
                  
                  
                    <mat-card *ngFor="let tile of tiles" 
                  
                  
                      [routerLink]="tile.routerLink" >
                  
                  
                          <button (click)="tile.click">test</button>
                  
                  
                      </mat-card>
                  
                  
                  Подскажите как правильно привязать (click)="tile.click"
                  
                  
                
Дык очень просто же: (click)="tile.click()"
Обсуждают сегодня