Reputation: 69
I am in process of making an ionic application and trying to open a link in app using cordova.InAppBrowser
but I get this error when I click it
Application Error
net::ERR_FILE_NOT_FOUND (file:///android_assets/www/(item.url))
MY Code
<div ng-repeat="item in object.torrents" class="button-bar bar-dark" >
<a onclick="window.open('(item.url)', '_system' );" class="button">Open</a>
</div>
Upvotes: 3
Views: 689
Reputation: 69
Html Code
<a ng-click = openUrl(item.url); class="button">button</a>
js Code
$scope.openUrl = function(url) {
//alert(url);
window.open(url, '_blank', 'location=no');
}
Upvotes: 1
Reputation: 3783
You are not using the angular syntax for object property retrieval.
Try this.
<div ng-repeat="item in object.torrents" class="button-bar bar-dark" >
<a onclick="cordova.InAppBrowser.open('{{item.url}}', '_system');" class="button">Open</a>
</div>
Upvotes: 1