Flask接口签名sign原理与实例代码浅析
291
2023-03-24
使用ionic(选项卡栏tab) icon(图标) ionic上拉菜单(ActionSheet) 实现通讯录界面切换实例代码
废话不多说了,直接给大家贴代码了,具体代码如下所示:
angular.module('myApp', ['ionic'])
.controller('RootCtrl', function($scope) {
$scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) {
console.log('Controller changed', oldController, oldIndex, newController, newIndex);
console.log(arguments);
};
})
.controller('HomeCtrl', function($scope, $timeout, $ionicModal, $ionicActionSheet) {
$scope.items = [];
$ionicModal.fromTemplateUrl('newTask.html', function(modal) {
$scope.settingsModal = modal;
});
//ionic 上拉菜单(ActionSheet)
var removeItem = function(item, button) {
$ionicActionSheet.show({
buttons: [],
destructiveText: 'Delete Task',
cancelText: 'Cancel',
cancel: function() {
return true;
},
destructiveButtonClicked: function() {
$scope.items.splice($scope.items.indexOf(item), 1);
return true;
}
});
};
var completeItem = function(item, button) {
item.isCompleted = true;
};
$scope.onReorder = function(el, start, end) {
ionic.Utils.arrayMove($scope.items, start, end);
};
$scope.onRefresh = function() {
console.log('ON REFRESH');
$timeout(function() {
$shttp://cope.$broadcast('scroll.refreshComplete');
}, 1000);
}
$scope.removeItem = function(item) {
removeItem(item);
};
$scope.newTask = function() {
$scope.settingsModal.show();
};
// Create the items
$scope.user = [
{
name:"Ben Sparrow",
words:"You on your way?"
},
{
name:"Max Lynx",
words:"Hey,it's me."
},
{
name:"Adam Bradleyson",
words:"I should buy a boat."
},
{
name:"Perry Governor",
words:"Look at my mukluks!"
},
{
name:"Mike Harrinqton",
words:"This is wicked good ice cream."
},
];
})
icon-on="ion-ios-filing" icon-off="ion-ios-filing-outlinehttp://" ng-controller="HomeCtrl"> Chats
icon-on="ion-ios-filing"
icon-off="ion-ios-filing-outlinehttp://"
ng-controller="HomeCtrl">
s-editing="isEditingItems" animation="fade-out" delete-icon="icon ion-minus-circled"> item="item" buttons="item.buttons" can-delete="true" can-swipe="true" on-delete="deleteItem(item)" ng-class="{completed: item.isCompleted}"> {{item.name}} {{item.words}}
s-editing="isEditingItems"
animation="fade-out"
delete-icon="icon ion-minus-circled">
item="item" buttons="item.buttons" can-delete="true" can-swipe="true" on-delete="deleteItem(item)" ng-class="{completed: item.isCompleted}"> {{item.name}}
item="item"
buttons="item.buttons"
can-delete="true"
can-swipe="true"
on-delete="deleteItem(item)"
ng-class="{completed: item.isCompleted}">
{{item.name}}
{{item.words}}
总结
以上所述是给大家介绍的使用ionic(选项卡栏tab) icon(图标) ionic上拉菜单(ActionSheet) 实现通讯录界面切换实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,会及时回复大家的。在此也非常感谢大家对我们网站的支持!
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~