我正试图在我的Cordova Ionic项目中使用离子模态,并且当被解雇时服务只显示空白背景:
// Create the Vibe modal that we will use later
$ionicModal.fromTemplateUrl('templates/new-vibe.html', {
scope: $scope
}).then(function(modal) {
$scope.modalVibe = modal;
});
// Triggered in the Vibe modal to close it
$scope.closeVibe = function() {
$scope.modalVibe.hide();
};
// Open the Vibe modal
$scope.newVibe = function() {
$scope.modalVibe.show();
};
templates\new-vibe.html
<ion-modal-view>
<ion-header-bar>
<h1 class="title">My Modal title</h1>
</ion-header-bar>
<ion-content>
Hello!
</ion-content>
</ion-modal-view>
<button ng-click="newVibe()" id="button_start" class="button button-outline button-energized" >
Continue Vibing.
</button>