I am new to Angular and I have found no clear answers on this subject no matter what I search for.
This is currently working:
<div class="col-sm" (click)="brandListRoute()">
which directs to this function in my component:
brandListRoute() {
this.router.navigate(['explore/brands']);
}
So this works perfectly, however when I first tried binding [routerLink] like this:
<div [routerLink]="['explore/brands']"> </div>
I can click on the div but nothing happens. So my question is, does a [routerLink] only work on things like anchor tags and buttons or is my above logic flawed?
Need to find the best solution for my problem. Thanks so much in advance!