Closing Twitter Bootstrap Modal From Angular Controller

后端 未结 8 830
时光说笑
时光说笑 2020-12-12 21:26

I have a modal window that I use to present a form to users. They enter the information and then press a button the has an ng-click. The server processes the request and s

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 21:59

    **just fire bootstrap modal close button click event**
    var app = angular.module('myApp', []);
    app.controller('myCtrl',function($scope,$http){
      $('#btnClose').click();// this is bootstrap modal close button id that fire click event
    })
    
    --------------------------------------------------------------------------------
    
    
    

    just set modal 'close button' id as i set btnClose, for closing modal in angular you have to just fire that close button click event as i did $('#btnClose').click()

提交回复
热议问题