bootstrap modal popup in angular 9 code example

Example 1: ways to open modal in angular

document.getElementById("openModalButton").click();

Example 2: bootstrap 4 modal angularjs controller

/**
 * Opens bootstarp modal with templateUrl, controller and modalData.
 * 
 * @param {string} tmplUrl - template Url.
 * @param {string} controllerName - controller to bind to modal.
 * @param {*} [modalData] - this additional data will get injected as $scope.modalData.
 * 
 * @return {object} promise which will be resolved or rejected while closing the modal.
 */
 $bootstrap4Modal.show(tmplUrl, controllerName, modalData)

Example 3: ngx-simple-modal

npm install ngx-simple-modal