Angular js bootstrap ui模态超时

时间:2015-04-13 16:26:36

标签: javascript ruby-on-rails angularjs coffeescript angular-ui-bootstrap

我正在尝试使用$ timeout函数打开一个bootstrap模式,但是当超时触发不止一次时,模态会保持打开状态。任何帮助都感激不尽。 感谢

SessionModalInstCtrl = ($scope, $modal, $timeout) ->
   $timeout (->
     $modal.open(
       templateUrl: 'session-timeout.html'
       controller: 'MmmSessionModalInstCtrl')
   ), 1000

看看我的观点是什么样的

%div{'data-ng-controller' => 'SessionModalInstCtrl'}
   %script{id: "session-timeout.html", type: "text/ng-template"}
    // modal content

1 个答案:

答案 0 :(得分:0)

这解决了它。控制器无法在open中定义。

  $modal.open(
    templateUrl: 'session-timeout.html')