skip to Main Content

Getting the inner HTML value from the dropdown

I am using a Bootstrap dropdown like this: <ul class="dropdown-menu"> <li> <a class="dropdown-item" href="#" (click)="getMyValue('myvalue')">My Value</a> </li> <li> <a class="dropdown-item" href="#" (click)="getMyValue('someothervalue')">Some Other Label</a> </li> </ul> and the function looks like this: getMyValue(todo: string) { console.log("selected value is:", todo); console.log("selected…

VIEW QUESTION
Back To Top
Search