html - Modal box is not working inside navbar tabs (bootstrap) -
i have been trying lot of times still no use not able display modal in navbar tabs. when click on blur triggered. can please me?
my template,
addnewrecord() { $('#editmodel').modal('show'); }
<div class="col-xs-12"> <div class="row"> <div class="col-xs-12"> <div class="tabbable tabs-left mb-lg"> <ul id="tabs2" class="nav nav-tabs"> <li class="nav-item"><a class="nav-link" href="#tab1" data-toggle="tab">home</a> </li> <li class="nav-item"><a class="nav-link active" [routerlink]="['/app/tables/basic']" data-toggle="tab">chatter</a> </li> </ul> <div id="tabs2c" class="tab-content bg-info-light"> <div class="tab-pane active"> <div class="page-title"> <div class="btn-group"> <button class="btn btn-sm btn-default" (click)='addnewrecord()'> new </button> </div> </div> <div class="modal fade" id="editmodel" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <div class="modal-body"> <form id='form' class="form-horizontal form-label-left parsleyjs" method="post" data-parsley-priority-enabled="false" novalidate="novalidate"> <div class="form-group"> <label for="email">firstname:</label> <input type="text" [(ngmodel)]='student.accountname' name='accountname' class="form-control" id="email" placeholder="enter firstname" required='required'> </div> <button type="submit" class="btn btn-primary" (click)='insertdata(student,student._id)'>{{buttonname}}</button> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal" (click)='resetform()'>close</button> </div> </div> </div> </div> </div> </div> </div> </div>
please try code,
$('#editmodel').show();
Comments
Post a Comment