I need to add the angular 4 click-event binding (click) in an HTML element from TS Component. Here the code:
$('.swiper-wrapper').append('<div class="swiper-slide basic-button" (click)="goToComponent(\'home/labels/\'' + label.id + ')" style="background-image: url(' + label.image + '); height: 300px; width: 300px;"></div>')
In angularJs i would use $compile, but in angular 4? Don't answer me with this other question because i don't understand the explanation.
It would be so useful if someone can explain me how to do this thing step by step (i'm new in Angular 4).
Thanks a lot