Here is some HTML code that I am working with:
<div class="btn-group" role="group" aria-label="Basic example" *ngFor="let techlist of technology">
<button type="button" class="btn btn-secondary" (click)="resList()">{{techlist.TechnologyRouteTitle}}</button>
</div>
I have a view model for the technology data:
public ComponentTypeId: number;
public ComponentTypeTitle: string;
public TechnologyRouteId: number;
There are currently 4 elements with unique TechnologyRouteKeys. Upon clicking one, I need to load a list of technologies. For this, I have implemented the following function:
resList(): void {
this.TestService.getResearchList(this.filterResearchList)
.then(response => {
this.technology = response.Object;
});
}
The filterResearchList view model looks like this:
public CompanyId: number;
public TechnologyRouteKey: string;
The company ID remains constant, however, I need to dynamically change the TechnologyRouteKey based on which button is clicked. I've been struggling with this for an hour and it's not working. Any suggestions on how I can approach this?