我想将我的页面放入模态幻灯片中,保持菜单栏静态(例如,当模态打开时,菜单/顶栏不会向上滑动)。
模式幻灯片向上 - 但导航栏/菜单栏应该是白色的。空间已创建(使用 class="has-header"),但它是白色的。
通过单击放大镜,该网站上的模式被激活 - click here 。我尝试制作一个插件但没有成功( here )。
这是我的代码:
打开模式(在我的 .html 中)
<i class="ion-ios-search-strong" ng-click="refineevent()"></i>
我的js的一部分
$ionicModal.fromTemplateUrl('app/components/stores/stores.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal){$scope.modal = modal;});
$scope.refineevent = function(){$scope.modal.show();};
$scope.closeModal = function(){$scope.modal.hide();};
$scope.$on('modal.shown', function(){console.log('Modal is shown!');});
}
还有我的 modal.html 文件:
<ion-modal-view>
<ion-view name="stores"><ion-pane ng-controller="storesCtrl">
<ion-content class="has-header">
...
</ion-content>
</ion-view>
</ion-modal-view>
最佳答案
对于模式,您必须创建标题。所以...
<ion-modal-view>
<ion-header-bar>
<button class="button button-clear icon ion-drag"></button>
<h1 class="title">LOGO</h1>
<button class="button button-clear icon ion-hanger"></button>
</ion-header-bar>
<ion-content>
</ion-content>
</ion-modal-view>
关于javascript - ionic 模式 - 保持导航栏/菜单可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35259434/