码迷,mamicode.com
首页 > 其他好文 > 详细

angular——分享按钮的上拉菜单

时间:2016-04-20 00:18:40      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:

<button  class="btn gray_text_btn list_item" ng-click="action.toShare()"><i class="icon ion-share"></i></button>
<!-------------------- 底部按钮  ----------------------->
    <section class="bar bar-footer lists_in_4_row">
            <button  class="btn gray_text_btn list_item" ng-click="action.toShare()"><i class="icon ion-share"></i></button>
            <button  class="btn gray_text_btn collect_btn animated_btn list_item" ng-click="collected = !collected" ng-class="{‘active‘:collected}">
                <i class=‘icon‘ ng-class=" collected ? ‘ion-ios-star‘ : ‘ion-ios-star-outline‘ "></i>68
            </button>
            <button  class="btn gray_text_btn  comment_btn list_item" ng-click=""  ng-class="{‘active‘:commented}" >
                <i class="icon" ng-class="commented ?  ‘ion-ios-chatboxes‘: ‘ion-ios-chatboxes-outline‘"></i>68
            </button>
            <button  class="btn gray_text_btn list_item" ng-click="action.toMoreOptions()">
                <i class="icon ion-navicon"></i>
            </button>
    </section>
// 「分享」action sheet
            $scope.action.toShare = function() {
                    var hideSheet = $ionicActionSheet.show({
                            buttons: [
                                    { text: ‘<i class="fa fa-wechat social_icon"></i><p>微信</p>‘ },
                                    { text: ‘<i class="ion-load-b social_icon"></i><p>朋友圈</p>‘ },
                                    { text: ‘<i class="fa fa-qq social_icon"></i><p>QQ</p>‘ },
                                    { text: ‘<i class="fa fa-weibo social_icon"></i><p>微博</p>‘ },
                            ],
                            cssClass: ‘share_action_sheet‘,
                            titleText: ‘分享到‘,
                            cancelText: ‘取消‘,
                            buttonClicked: function(index) {
                                    switch (index){
                                            case 0 :
                                                    return true;
                                            case 1 :
                                                    return true;
                                            case 2 :
                                                    return true;
                                            case 3 :
                                                    return true;
                                    }
                            }
                    });
            };

 

angular——分享按钮的上拉菜单

标签:

原文地址:http://www.cnblogs.com/hu-clover/p/5410709.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!