[Vuejs]-How to show bootstrap modal dialog in vue js?

0πŸ‘

βœ…

The modal component is managed by jQuery, you have to use jquery to open your modal.

I need you Vue code too help you much, if it’s an ajax request to register user, wait the success callback to make a

$('#modal').modal('show') 

If it’s a synchronous process, call you modal in the mounted method of you Vue instance.

πŸ‘€Samy

-1πŸ‘

for eg:

if you want to show modal box on click button then use

<button type="button" data-toggle="modal" data-target="#myModal">Open Modal</button>

and if you want to open model box after any process is finished then use

$('#modal').modal('show');

"#myModal" is ID of the modal box you want to show.

more info https://www.w3schools.com/bootstrap/bootstrap_modal.asp

πŸ‘€Prince Sodhi

Leave a comment