I\'m working on a website using bootstrap.
Basically, I wanted to use a modal in the home page, summoned by the button in the Hero Unit.
Button code:
while working with Angular(5) , i face the same issue , but in my case i solved as follows:
component.html
component.ts
NOTE: need to import jquery in ts file as "declare var $ :any;"
showresult(){
debugger
$('#myModal').modal('show');
}
Changes i made :
removed "data-toggle="modal" from Button tag (thanks to @miCRoSCoPiC_eaRthLinG this answer helps me here) in my case its showing modal so i created (click)="showresult()"
inside component.ts need to declare Jquery($) and inside button click method showresult() call " $('#myModal').modal('show');"