- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个在时间限制内关闭的工作 ionicPopup。是否可以在屏幕上的任意位置单击/双击关闭它?我知道我可以设置一个关闭按钮,但这并不是我真正需要的。我需要一个简单的关闭方法,我认为点击屏幕更实用。
代码:
var errorPopup = $ionicPopup.show({
scope: $scope,
title: 'Unexpected Error',
templateUrl: 'error.html'
});
$timeout(function() {
errorPopup.close();
}, 3000);
}
还有一个问题,我的 html 代码中有一堆超链接标签。但是当我运行我的应用程序时,ionic 会在每个超链接周围放置一个 1px 的边框。是否有可能以某种方式删除“”标签边框。我知道它应该是一个 CSS 的东西,但我不想修改原来的 ionic 样式,但更愿意用另一个覆盖那个部分。有没有大师可以提供帮助?
解决方案:(Link)
<div class="col text-center">
<a class="item dash-link" id="link" href="#" onclick="window.open('http://www.example.com', '_blank', 'location=no'); return false;">
<img ng-src="img/icons/example.png" height="80" width="80"></a>
<br>
GMail
</div>
CSS:
#link {
text-decoration:none;
border:0;
outline:none;
}
最佳答案
This is a service实现此行为。
安装
用凉亭安装
$ bower install ionic-close-popup
在您的应用的依赖项中包含 ionic.closePopup 模块:
angular.module('app', ['ionic', 'ionic.closePopup'])
用法
将新创建的弹出窗口注册到 closePopupService 服务:
var alertPopup = $ionicPopup.alert({
title: 'Alert popup',
template: 'Tap outside it to close it'
});
IonicClosePopupService.register(alertPopup);
关于css - ionicPopup 点击关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43206358/
最近我制作了一个使用 ionic 框架构建的应用程序。现在,当弹出窗口显示时,我无法使用后退按钮。当我按下物理后退按钮时弹出窗口关闭,现在我需要它在我按下物理后退按钮时显示,所以我找到了禁用物理后退按
ionicpopup 内容中是否可以有换行符? 我正在尝试这样做: $ionicPopup.alert({ title: 'Now what?',
我有一个有趣的情况,我在我的 ionic 应用程序的旅行页面上轮询位置更改。当应用程序检测到某个位置发生位置变化时,它会调用 $ionicPopup.show() 警报以查看用户想要对此执行的操作。
我使用如下代码创建了一个 ionic 弹出窗口,如下所示: $ionicPopup.alert({ title: title,
我有一个在时间限制内关闭的工作 ionicPopup。是否可以在屏幕上的任意位置单击/双击关闭它?我知道我可以设置一个关闭按钮,但这并不是我真正需要的。我需要一个简单的关闭方法,我认为点击屏幕更实用。
我正在尝试使用 $ionicPopup在我的应用程序上处理登录/注册。 我从一个服务打开它,所以我创建了一个新的范围并将它附加到 ionicPopup。 它看起来像这样: $ionicPopup.sh
我在代码中使用 ionic 弹出窗口,其中创建了一个指令来使自动光标聚焦输入框。第一次打开弹出窗口时它工作正常,但光标没有聚焦到当我关闭弹出窗口并再次打开它时,输入框再次出现,任何人都可以告诉我为什么
文档说: Show a simple prompt popup, which has an input, OK button, and Cancel button. Resolves the prom
我有一个 $ionicPopup,里面有一些互动内容 - 但是,为了使用它,我必须用一个简单的命令初始化它: myFactory.initialise(myElement) 有什么方法可以判断弹出窗口
我想从 ionic 弹出窗口中完全删除标题区域。我删除了标题标签并尝试了。但仍然可以看到标题空间可见。这是我的代码。 var registerPopup = $ionicPopup.show({
我想在用户按下是按钮时打开 ionic 模式,但在用户按下否按钮时关闭 ionic 弹出窗口。我怎样才能做到这一点? 目前,在每种情况下都会打开 ionic 弹出窗口。这是到目前为止我的代码: ser
当用户点击操作表上的“自定义”按钮时,我尝试打开一个弹出窗口,但我不知道如何在两者之间进行交互。我最好的猜测如下,因为当我在 View 中调用 ng-click="showPrompt()"时,会触发
我将以下代码用于一些同时使用 $ionicPopup 和 Firebase 的验证内容: onTap: function(e) { firebase.auth().applyActionCod
我正在使用 IonicFramework 开发一个应用程序与 phonegap-googlemaps-plugin也就是说,当用户点击 infoWindow 的标记时,它会调用一个确认函数,然后调用
我使用 创建了这个弹出窗口 $ionicPopup.show({ title: 'Choose Location...', buttons:[
所以我想修改 $ionicPopup 中的默认宽度,为此我必须将“cssClass”添加到我的弹出对象中,就像下面的代码一样 $scope.getScore = function(){ var
我正在使用$ ionicPopup.confirm(),但我想更改“取消按钮”文本。有可能这样做吗? 我知道.show()语法: buttons: [ { text: 'Cancel' }
我正在尝试更改 $ionicPopup 的宽度;我尝试使用以下 css 代码将其导入 cssClass: my-popup: .my-popup { width: 400; }
这是我的 Controller 代码。显示弹出窗口并单击按钮,进行一些验证: UZCampusWebMapApp.controller('PlanCtrl',function($scope, $ion
我用 $ionicPopup 创建了一个项目。我将 $ionicPopup 代码放在 .factory 中。在我的 $ionicPopup.show() 中,我要求用户输入一个值。用户已经输入值后,它
我是一名优秀的程序员,十分优秀!