Angular js bootstrap ui 模态超时

Angular js bootstrap ui modal timeout

我正在尝试使用 $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

这解决了。无法在 open.

中定义控制器
  $modal.open(
    templateUrl: 'session-timeout.html')