Bootstrap $(‘#myModal’).modal(‘show’) is not working

Most common reason for such problems are 1.If you have defined the jquery library more than once. <script type=”text/javascript” src=”https://code.jquery.com/jquery-1.11.3.min.js”></script> <script src=”http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js”></script> <div class=”modal fade” id=”myModal” aria-hidden=”true”> … … </div> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script> The bootstrap library gets applied to the first jquery library but when you reload the jquery library, the original bootstrap load is lost(Modal … Read more

Handle Bootstrap modal hide event in Vue JS

Bootstrap uses JQuery to trigger the custom event hidden.bs.modal so it is not easily caught by Vue (which I believe uses native events under the hood). Since you have to have JQuery on a the page to use Bootstrap’s native modal, just use JQuery to catch it. Assuming you add a ref=”vuemodal” to your Bootstrap … Read more

How to use Bootstrap modal using the anchor tag for Register?

You will have to modify the below line: <li><a href=”#” data-toggle=”modal” data-target=”modalRegister”>Register</a></li> modalRegister is the ID and hence requires a preceding # for ID reference in html. So, the modified html code snippet would be as follows: <li><a href=”#” data-toggle=”modal” data-target=”#modalRegister”>Register</a></li>

AngularJS passing data to bootstrap modal

I’d suggest you to pass the scope of your own controller instead of passing same controller again, by doing that you can remove the resolve also. var modalInstance = $uibModal.open({ templateUrl: ‘myModalContent.html’, scope: $scope, //passed current scope to the modal size: ‘lg’ }); Otherwise you need to create a new controller and assign that controller … Read more

Create a simple Bootstrap Yes/No confirmation or just notification alert in AngularJS

so create a reusable service for that… read here code here: angular.module(‘yourModuleName’).service(‘modalService’, [‘$modal’, // NB: For Angular-bootstrap 0.14.0 or later, use $uibModal above instead of $modal function ($modal) { var modalDefaults = { backdrop: true, keyboard: true, modalFade: true, templateUrl: ‘/app/partials/modal.html’ }; var modalOptions = { closeButtonText: ‘Close’, actionButtonText: ‘OK’, headerText: ‘Proceed?’, bodyText: ‘Perform this … Read more