ui-bootstrap-tpls.js库

$uibModal服务

$uibModalInstance服务

一、在angular中应用modal

$uibModal

使用方法:直接注入到控制器中。

 .controller('name', function($scope,$uibModal) {  

二、" $uibModal.open()"方法返回的是一个modal实例,下面是一些可用参数:

1、animation:设置为false,关闭动画效果。默认"true"。

2、appendTo:给modal设置一个容器。默认:"body"。

3、backdrop:设置false关闭控件背景,默认为"true"。

  可能的值:

    ——"true":有背景可以通过点击背景来关闭控件。

    ——"false":没有背景。

    ——"static":有背景,但点击背景不能关闭控件。

4、"backdropClass":给背景添加一个样式类。

5、"controller":为modal内容添加控制器。

6、"keyboard":设置modal是否可以通过按键"ESC"关闭,默认:"true"。

7、"openedClass":modal打开时,为html body 添加样式类。

8、"size":设置modal的大小。

  可能的值:

    ——"lg" 

    ——"sm"

9、"template":设置modal内容。

10、"templateUrl":通过引入html来设置modal的内容。

11、"windowClass":为modal添加样式类。

12、"windowTopClass":为当前modal添加样式类。

13、"resolve":调用控制器与modal控制器中传递值。

三、下面是$uibModalInstance一些可用的对象:

1、"$uibModalInstance.dismiss();"——取消modal

2、"$uibModalInstance.close();"——关闭modal

参考资料1:【https://github.com/angular-ui/bootstrap/tree/master/src/modal/docs

参考资料2:【https://my.oschina.net/codingBingo/blog/715869

模态框——angular的更多相关文章

  1. angular $modal模态框

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  2. angularjs 给封装的模态框元素传值,和实现兄弟传值

    本例实现封装的元素所放的位置不同,而选择不同的传值,这里举例封装了bootstrap模态框,以后也方便大家去直接使用.方法举例如下:首先主页调用css/js有: <link rel=" ...

  3. angularJS使用rootscope创建父域和子模态框通用的属性与函数

    1. 在声明创建controller指明引用$rootscope reviewInterfaceDo.controller('reviewInterfaceDo', function($scope, ...

  4. Angular-ui/bootstarp modal 主控制器与模态框控制器传值

    调用模态框: $scope.open = function (size) { //这里很关键,是打开模态框的过程 var modalInstance = $uibModal.open({ animat ...

  5. Angular2+之模态框-使用ngx-bootstrap包中的模态框组件实现

    模态框是项目中经常会用到的一个公共功能,通常会被用左提示框或者扩展选项框. 下面,我用一个小例子来简单展示实现模态框功能的过程: 1.为项目加包: ng add ngx-bootstrap 2.在xx ...

  6. js控制Bootstrap 模态框(Modal)插件

    js控制Bootstrap 模态框(Modal)插件 http://www.cnblogs.com/zzjeny/p/5564400.html

  7. Bootstrap模态框按钮

    1.触发模态框弹窗的代码 这里复制了一段Bootstrap模态框的代码 <h2>创建模态框(Modal)</h2> <!-- 按钮触发模态框 --> <but ...

  8. boostrap 模态框

    <div class="modal fade" id="myModal" tabindex="-1" role="dialo ...

  9. 解决bootstrap模态框内输入框无法获取焦点

    bootstrap 模态框中的input标签在某些情况下会无法获取焦点. 最终解决方法:去除模态框的 tabindex="-1" 属性即可

随机推荐

  1. Windows Server IIS设置计划任务重启

    Windows Server ,IIS设置计划任务重启. echo ----->>c:\log_iisreset.txt &&  echo %date% %time% &g ...

  2. mysql批量替换zencart数据中的反斜杠\

    update products_description set products_description=replace(products_description, "\\'",& ...

  3. Spring Boot 整合监听器

    Listener是servlet规范中定义的一种特殊类,用于监听servletContext.HttpSession和servletRequest等域对象的创建和销毁事件,监听域对象的属性发生修改的事 ...

  4. oracle partition 分区

    --范围分区create table person( id int, name varchar2(20), birth date, sex char(2))partition by range (bi ...

  5. C的随机数用法

    rand() #include <stdio.h> #include <stdlib.h> int main() { ; i < ; i++) { printf(&quo ...

  6. DB2的HADR

    db2stop force; db2start; db2 restore db clmsdb; db2 start hadr on db clmsdb as standby; ************ ...

  7. Swiper 的引入

    1. 从官网下载必要资源 https://www.swiper.com.cn/download/index.html#file1 2. 在项目中<head>中引入swiper.min.cs ...

  8. php四种基础算法:冒泡,选择,插入和快速排序法PHP基础教程

    许多人都说 算法是程序的核心,一个程序的好于差,关键是这个程序算法的优劣.作为一个初级phper,虽然很少接触到算法方面的东西.但是对于冒泡排序,插入排序,选择排序,快速排序四种基本算法,我想还是要掌 ...

  9. 建立PHP的本地调试环境PHP基础教程

    对于windows平台而言,PHP供给了一个安装程序,但是这个安装程序是不能直接运行来建立个人服务器平台的,而是必需嵌进现有的服务器平台,如:Windows NT下的IIS或Windows下的PWS, ...

  10. The GuidRepresentation for the reader is CSharpLegacy, which requires the binary sub type to be Uuid

    使用客户端链接MongoDb报错 The GuidRepresentation for the reader is CSharpLegacy, which requires the binary su ...