0
イオンバージョン1の作業を開始し、モーダルを開くためのコードを追加しましたが、モーダルを開くことはできません。それは私にこのエラーを与えています: - "リソースを読み込めませんでした:net :: ERR_FILE_NOT_FOUND"。 - :私は私のWWW /ページ/モーダル/ MEMBERID/memberid.htmlフォルダ内のHTMLファイルを作成しているイオンモーダルポップアップが機能しない
// Load the modal from the given template URL
$ionicModal.fromTemplateUrl('pages/modal/memberid/memberid.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.modal = modal;
});
$scope.openModal = function() {
$scope.modal.show();
};
$scope.closeModal = function() {
$scope.modal.hide();
};
//Cleanup the modal when we're done with it!
$scope.$on('$destroy', function() {
$scope.modal.remove();
});
// Execute action on hide modal
$scope.$on('modal.hidden', function() {
// Execute action
});
// Execute action on remove modal
$scope.$on('modal.removed', function() {
// Execute action
});
$ionicModal.show();
- :以下は私のコードです。見つからないテンプレートファイルに関するエラーを表示しています
にURLとして
modal.html
を使用しようとすることができますか? –コントローラを指定したhtmlページに追加できます –