图片轮播
电脑上显示不出来
setTimeout(function() {
$ionicSlideBoxDelegate.slide(0);
$ionicSlideBoxDelegate.update();
$scope.$apply();
});
获取轮播图片数量,和第几张图片
$scope.slideChange = function (){
$scope.slideCount = parseInt($ionicSlideBoxDelegate.slidesCount());
$scope.slideCurrentIndex = parseInt($ionicSlideBoxDelegate.currentIndex()) + 1;
}
设置弹框样式
.popup-head {
border-bottom: none;
}
.popup-container .popup {
border-radius: 1rem;
background-color: rgba(255,255,255,1);
}
.popup-body{
padding: 10px;
overflow: auto;
text-align: center;
border-bottom: 1px solid #E5E5E5;
}
.popup-body a{
font-size: 1.5rem;
color: black;
}
.popup-buttons button:nth-child(2){
border-left: 1px solid #E5E5E5;
}
.button, .button.button-positive{
background-color: white;
color: blue;
}
隐藏滚动条
.scroll-bar-indicator
{
display: none;
}
滑动删除后,隐藏删除
$ionicListDelegate.closeOptionButtons();
$ionicConfigProvider.scrolling.jsScrolling(true);
获取ui-router的一个stateName
$rootScope.$on('$stateChangeSuccess', function(event, to, toParams, from, fromParams) {
$rootScope.$previousState = from;
});
ui_router声明路由的resolve属行中不能用$scope,否则会造成循环依赖