角引导模式打开的onload [英] Angular bootstrap modal open onload

查看:214
本文介绍了角引导模式打开的onload的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 http://angular-ui.github.io/bootstrap/ 模态。

现在我想开模态,只要页面加载

 <脚本>
     $(文件)。就绪(函数(){
                 开('LG');
      });
  < / SCRIPT>


解决方案

的http:// angular- ui.github.io/bootstrap/ 具有指令和$模态服务两者的那些可以用来打开模式窗口。

然后需要使用:

  $ modal.dialog({})开('modalContent.html')。

有在这里一个类似的问题:<一href=\"http://stackoverflow.com/questions/16265844/invoking-modal-window-in-angularjs-bootstrap-ui-using-javascript\">Invoking使用JavaScript 在AngularJS引导UI模式窗口

I am using http://angular-ui.github.io/bootstrap/ modal.

Now i want to open Modal whenever page loads

  <script>
     $(document).ready(function () {                
                 open('lg');         
      });
  </script>

解决方案

Angular http://angular-ui.github.io/bootstrap/ has a directive and the $modal service and both of those can be used to open modal windows.

you then need to use:

$modal.dialog({}).open('modalContent.html');  

there is a similar question in here: Invoking modal window in AngularJS Bootstrap UI using JavaScript

这篇关于角引导模式打开的onload的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆