ionic 弹出框

1.带取消、肯定按钮javascript

var confirmPopup = $ionicPopup.confirm({
          title: "标题",
          subTitle: '子标题',
          cancelText:'取消',
          okText:'肯定'
        });
        confirmPopup.then(function(res) {
          if(res) {
            console.log('You are sure');
          } else {
            console.log('You are not sure');
          }
        });

2.肯定按钮提示框java

var alertPopup = $ionicPopup.alert({
        title: '标题'
      });
      alertPopup.then(function(res) {
        console.log('点击了肯定按钮');
      });
      $timeout(function () {
        alertPopup.close(); //因为某种缘由10秒后关闭弹出
      }, 10000);
相关文章
相关标签/搜索