I am trying to execute some code when the bootstrap model opens but everything i try isn't working. Modal:
<div class="modal fade" id="mobileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true" data-keyboard="false" data-backdrop="static" >
Typescript:
@ViewChild('mobileModal') mobileModal: ElementRef;
ngAfterViewInit() {
    $(this.mobileModal.nativeElement).on('hidden.bs.modal', () => {
      console.log("TESTTESTTEST")
    });
    $(this.mobileModal.nativeElement).on('shown.bs.modal', () => {
      console.log("TESTTESTTEST")
    });
    $("#mobileModal").on('shown', function () {
      console.log("TESTTESTTEST")
    });
  }
Other questions i looked at but didnt work:
Hook to bootstrap 4 modal show / hide events from Typescript
 
    