【发布时间】:2017-08-01 06:08:00
【问题描述】:
我刚刚开始研究 ionic 版本 1,并添加了一个打开模式的代码,但它没有打开任何模式。它给了我这个错误:-“加载资源失败:net::ERR_FILE_NOT_FOUND”。以下是我的代码:-
// 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();
我在 www/pages/modal/memberid/memberid.html 文件夹中创建了一个 html 文件:-。它显示有关找不到模板文件的错误
【问题讨论】:
标签: ionic-framework