[英]How to present a popup viewController using ionic (v1) framework?
从这里的离子文档
// An alert dialog
$scope.showAlert = function() {
var alertPopup = $ionicPopup.alert({
title: 'Don\'t eat that!',
template: 'It might taste good'
});
alertPopup.then(function(res) {
console.log('Thank you for not eating my delicious ice cream cone');
});
};
然后,当您想要显示它时,只需调用方法:
$scope.showAlert();
在示例代码中,您将这样称呼它:
myApp.showAlert();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.