Ionic中[弹出式窗口]有两种(如下图所示),$ionicModal和$ionicPopup;

$ionicModal是完整的页面;

$ionicPopup是(Dialog)对话框样式的,直接用JavaScript设定对话框的一些参数,通常用于通知消息、确认等作用;

http://ionicframework.com/docs/api/service/$ionicModal/   官方例子及说明

http://www.bubuko.com/infodetail-822048.html

模板加载

$ionicModal.fromTemplateUrl('new-task.html', function(modal) {
$scope.taskModal = modal;
}, {
scope: $scope,
animation: 'slide-in-up'
});

模板显示与关闭

$scope.newTask = function() {
$scope.taskModal.show();
}; // Close the new task modal
$scope.closeNewTask = function() {
$scope.taskModal.hide();
};

注:ionic 所有的数据源 都放在service 中 ,方便其他 controller 调用,一个factory 可以被多个不同的 controller 调用

随机推荐

  1. 小程序navigator点击有时候会闪一下

    <navigator hover-class="none">

  2. Disable File System Redirector For Windows x64 (Python recipe)(转)

    This disables the Windows File System Redirector.When a 32 bit program runs on a 64 bit operating sy ...

  3. How To Backup Your Android Phone’s Boot, Recovery And System Partition Images -- RomDump

    One can’t stress enough on the importance of backups and when it comes to tinkering with your Androi ...

  4. perf 工具介绍2

    [root@localhost ~]# cat test1.c void longa() { int i,j; ; i < ; i++) j=i; //am I silly or crazy? ...

  5. erlang 中文社区 下载

    http://www.cnerlang.com/download/     erlang 下载 http://www.blogjava.net/killme2008/archive/2007/06/1 ...

  6. 相比xib 使用代码编排view 的一个明显的好处就是可以更好地重复使用已有代码,减少代码冗余。

    相比xib 使用代码编排view 的一个明显的好处就是可以更好地重复使用已有代码,减少代码冗余.

  7. NSPredicate 的使用(持续更新)

    NSPredicate 谓词工具一般用于过滤数组数据,也可用来过滤CoreData查询出的数据. 1). 支持keypath 2). 支持正则表达式 在使用之前先新建3个类 Teacher Info ...

  8. Eclipse点不出方法了

    window→preferences→java→editor→Content Assist→Advanced 然后选中右上方的所有 右下方选中一个即可.

  9. 将MyEclipse项目导入到Eclipse中

    1.请首先确保你的eclipse是javaee版本的,或者已经安装wtp插件 2.然后修改eclipse工程下的.project文件: 3.在<natures></natures&g ...

  10. [JQuery] jQuery选择器ID、CLASS、标签获取对象值、属性、设置css样式

    reference : http://www.suyunyou.com/aid1657.html jQuery是继prototype之后又一个优秀的Javascrīpt框架.它是轻量级的js库(压缩后 ...