ionic怎么实现一页多屏
1个回答
展开全部
1.首先是页面,在头上加个返回按钮,代码如下
[html] view plain copy print?
<ion-view>
<ion-nav-title>
</ion-nav-title>
<ion-nav-buttons side="left">
<button class="button button-icon icon ion-ios-arrow-back" ng-click="goBack()"></button>
</ion-nav-buttons>
<ion-content>
</ion-content>
</ion-view>
2.增加一个$cacheFactory用来保存url地址
[javascript] view plain copy print?
.factory('pageCache',function($cacheFactory){
return $cacheFactory('page');
[html] view plain copy print?
<ion-view>
<ion-nav-title>
</ion-nav-title>
<ion-nav-buttons side="left">
<button class="button button-icon icon ion-ios-arrow-back" ng-click="goBack()"></button>
</ion-nav-buttons>
<ion-content>
</ion-content>
</ion-view>
2.增加一个$cacheFactory用来保存url地址
[javascript] view plain copy print?
.factory('pageCache',function($cacheFactory){
return $cacheFactory('page');
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询