常常在操作中和用户进行交互,及时反馈操作结果;用到alert 和confrim 功能 找到一个基于anguarjs-ui的modal,方便我们使用

angular-dialog-service

注意要引入

Angular JS ngSanitize - http://code.angularjs.org/1.2.1/angular-sanitize.min.js

ngSanitize: http://docs.angularjs.org/api/ngSanitize (needed for ng-bind-html)

参见官方实例

使用 confirm , 针对选择 yes 和选择no 的方法

 var dlg = $dialogs.confirm('Please Confirm','Is this awesome or what?');
dlg.result.then(function(btn){
//yes callback
$scope.confirmed = 'You thought this quite awesome!';
},function(btn){
//no callback
$scope.confirmed = 'Shame on you for not thinking this is awesome!';
});

AngularJs-ui modal 封装 dialog的更多相关文章

  1. iframe中的jquery ui modal dialog 覆盖父窗口

    在iframe中 使用jquery ui dialog,弹出后可以覆盖父窗体 ///iframe中的jquery ui modal dialog 覆盖父窗口 function openDialog() ...

  2. jQuery UI 对话框(Dialog) - 模态表单

    <!doctype html><html lang="en"><head> <meta charset="utf-8" ...

  3. jquery ui中的dialog,官网上经典的例子

    jquery ui中的dialog,官网上经典的例子   jquery ui中dialog和easy ui中的dialog很像,但是最近用到的时候全然没有印象,一段时间不用就忘记了,这篇随笔介绍一下这 ...

  4. angularjs UI Libraries

    angularjs UI Libraries ● ng-bootstrap is currently available. ● PrimeNG has largest number of compon ...

  5. Android 封装Dialog

    package com.example.myandroid01; import android.support.v7.app.ActionBarActivity; import android.os. ...

  6. Angularjs的directive封装ztree

    一般我们做web开发都会用到树,恰好ztree为我们提供了多种风格的树插件. 接下来就看看怎么用Angularjs的directive封装ztree <!DOCTYPE html> < ...

  7. UIBootatrap:是由AngularJS UI团队编写的纯AngularJS实现的Bootstrap组件

    本文为翻译文档.原文是https://angular-ui.github.io/bootstrap/(需要FQ). 准备工作: 依赖关系:这个库中包含一组基于Bootstrap组件和CSS的原生Ang ...

  8. 封装dialog弹框

    <!DOCTYPE html> <html lang="en"> <head> <meta name="viewport&quo ...

  9. vue+element UI + axios封装文件上传及进度条组件

    1.前言 之前在做项目的时候,需要实现一个文件上传组件并且需要有文件上传进度条,现将之前的实现过程简单记录一下,希望可以帮助到有需要的人. 项目用的是Vue框架,UI库使用的是element UI,前 ...

随机推荐

  1. BZOJ 3143 HNOI2013 游走 高斯消元 期望

    这道题是我第一次使用高斯消元解决期望类的问题,首发A了,感觉爽爽的.... 不过笔者在做完后发现了一些问题,在原文的后面进行了说明. 中文题目,就不翻大意了,直接给原题: 一个无向连通图,顶点从1编号 ...

  2. spring AspectJ的Execution表达式说明

    Aspectj切入点语法定义 在使用spring框架配置AOP的时候,不管是通过XML配置文件还是注解的方式都需要定义pointcut"切入点" 例如定义切入点表达式 execut ...

  3. Binary Indexed Tree 2D 分类: ACM TYPE 2014-09-01 08:40 95人阅读 评论(0) 收藏

    #include <cstdio> #include <cstdlib> #include <climits> #include <cstring> # ...

  4. struct {0}初始化

    #include <iostream> struct MyStruct { MyStruct(int a) { a = b = ; } int a; int b; }; int main( ...

  5. Kerberos的组件和术语(翻译和注解)

    之所以要翻译这篇文章,是因为提到了一些通常于对Kerberos协议简介性质的文章所没有提到的细节,而这些细节对于理解Kerberos的工作原理,以及Kerberos协议实现的使用都是很有必要的. 1. ...

  6. RDLC报表BC4000错误

    如果RDLC报表报 BC4000错误,那是因为在矩阵外上面添加了文本框的缘故,导致系统不能读到RDLC报表表体,告诉你报表没有定义: 解决办法: 把表头文字放入矩阵中.

  7. CodeSite使用小结 转载

    一.要使用Codesite,需要引用csintf单元二.CodeSite的基本方法(一)AddCheckPoint方法codesite.AddCheckPoint 加入监测点(二)AddSeperat ...

  8. iOS网络检测

    使用之前请从Apple网站下载示例:点此下载 Reachability 中定义了3种网络状态: typedef enum : NSInteger { NotReachable = ,//无网络 Rea ...

  9. C# WINFORM 捕获全局异常

    using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Thr ...

  10. BZOJ 1008: [HNOI2008]越狱 快速幂

    1008: [HNOI2008]越狱 Description 监狱有连续编号为1...N的N个房间,每个房间关押一个犯人,有M种宗教,每个犯人可能信仰其中一种.如果相邻房间的犯人的宗教相同,就可能发生 ...