如何给AngularJS Popup上课

时间:2015-02-16 09:36:09

标签: javascript css angularjs popup

这是我的代码。当我点击它时,它会显示一个带有自动生成的CSS的弹出窗口。我想通过调用一些id和类来对CSS进行一些更改。我如何给它提供id或类,以便我可以通过调用类或ID来改变CSS。

$scope.showPopup = function() {
$scope.data = {}

// An elaborate, custom popup
    var myPopup = $ionicPopup.show({

  title: 'Social Media Services',

  scope: $scope,
  buttons: [
  { 
  type :'ion-social-facebook positive button-large',

      onTap: function(e) {
       //$cordovaSpinnerDialog.show("aaa", "aaaa");
         window.open('https://www.facebook.com/BinDawood.Co', '_system', 'location=yes');
      }
    },
    { type :'ion-social-twitter calm',
      onTap: function(e) {
      // $cordovaSpinnerDialog.show("aaa", "aaaa");
         window.open('https://twitter.com/BinDawoodco', '_system', 'location=yes');
      }
    },
    {  type :'ion-social-pinterest assertive',
      onTap: function(e) {
      // $cordovaSpinnerDialog.show("aaa", "aaaa");
          window.open('http://pinterest.com/bindawoodco', '_system', 'location=yes');
      }
    },

  ]
});
myPopup.then(function(res) {
  console.log('Tapped!', res);
});

};

1 个答案:

答案 0 :(得分:1)

在作为$ ionicPopup.show参数传递的对象中添加属性cssClass

  cssClass: '', // String, The custom CSS class name