I've been attempting to display the modal, but haven't been able to succeed even after several tries.
Below is the code for the modal:
<!-- Login modal -->
<div class="modal fade" id="login_2" tabindex="-1" role="dialog" aria-labelledby="myLogin" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-popup">
<a href="#" class="close-link"><i class="icon_close_alt2"></i></a>
<form action="#" class="popup-form" id="myLogin">
<div class="login_icon"><i class="icon_lock_alt"></i></div>
<input type="text" class="form-control form-white" placeholder="Username">
<input type="text" class="form-control form-white" placeholder="Password">
<div class="text-left">
<a href="#">Forgot Password?</a>
</div>
<button type="submit" class="btn btn-submit">Submit</button>
</form>
</div>
</div>
</div><!-- End modal -->
The objective is to automatically load this modal if a specific variable is set in $stateParams
within the controller. Otherwise, it should stay hidden. I have attempted to use
angular.element('login_2').modal()
without success.