无法在 inappbrowser/new window 中显示我的模板 html
Unable to display my template html in inappbrowser/new window
我想使用 angularjs inappbrowser 显示我的模板,但最后我收到了一个错误
code":-1100,"message":"The requested URL was not found on this server.",
我的代码:
$cordovaInAppBrowser.open('templates/payment.html', '_blank').then(function(event){
console.log('Open successfully');
}, function(event) {
});
当我尝试将 url 替换为外部时,它正在工作。那么,inappbrowser 是否必须是外部的 link?
在新 window 中打开我的模板的任何解决方案?
我终于在新 window/inappbrower 中成功显示了我的模板。
我的文件结构是 "templates/Home/payment.html"
因此,代码将是
var ref= $cordovaInAppBrowser.open('templates/Home/payment.html', '_blank', options)
.then(function(event) {
console.log('Open Url success', event);
},function(event) {
// error
});
希望这对您有所帮助。
我想使用 angularjs inappbrowser 显示我的模板,但最后我收到了一个错误
code":-1100,"message":"The requested URL was not found on this server.",
我的代码:
$cordovaInAppBrowser.open('templates/payment.html', '_blank').then(function(event){ console.log('Open successfully'); }, function(event) { });
当我尝试将 url 替换为外部时,它正在工作。那么,inappbrowser 是否必须是外部的 link?
在新 window 中打开我的模板的任何解决方案?
我终于在新 window/inappbrower 中成功显示了我的模板。 我的文件结构是 "templates/Home/payment.html"
因此,代码将是
var ref= $cordovaInAppBrowser.open('templates/Home/payment.html', '_blank', options) .then(function(event) { console.log('Open Url success', event); },function(event) { // error });
希望这对您有所帮助。