一、脏数据
二、广播
//发送广播
var notedurgress = 12;
$rootScope.$broadcast('pdfLoad',notedurgress);
//监听
$rootScope.$on('pdfLoad', function (event, results) {
//results传递的数据
})
三、滚动到顶部
$ionicScrollDelegate.scrollTop();
四、tab切换
<tab-slide-box tab="0" class="detail-tabs ub ub-f1 ub-ver" style="height: 100%;">
<div class="tsb-icons bor-b-none" id="tsb-icons">
<div class="tsb-ic-wrp">
<ion-scroll direction="false" class="tsb-hscroll" >
<div class="scroll">
<a class="s-btn-right" on-tap="tabChange(0)">
<span ng-class="{'active':slideHasChangeIndex == 0}" class="tab-item-text">123</span>
</a>
<a class="s-btn-left" on-tap="tabChange(1)">
<span ng-class="{'active':slideHasChangeIndex == 1}" class="tab-item-text">567</span>
</a>
</div>
</ion-scroll>
</div>
</div>
<ion-slide-box style="100%;" show-pager="false">
<ion-slide>
<ion-content>
</ion-content>
</ion-slide>
<ion-slide>
<ion-content>
</ion-content>
</ion-slide>
</ion-slide-box>
</tab-slide-box>
五、列表页底部有定位按钮时,会遮挡最后一条数据,合适位置加padding有效
六、在ionic中使用label标签失效,更换标签就可以啦
<label for="checkbox-whole">
<div class="checkbox-tab">
<input ng-change="checkboxArrOn(item)" ng-model="checkboxArrState" type="checkbox" id="checkbox-whole">
</div>
<span>全选</span>
</label>
七、获取当前路由名字
八、滚动到某个位置
var mainScroll = $ionicScrollDelegate.$getByHandle('mainScroll');
mainScroll.scrollTo(0, 100, false);