visual studio - Why is VisualStudio not returning my json -
some javascript code calls url , uses promise function result. specific ionic factory code (from tutorial @ this blog andrew mcgivery) i've inserted blank ionic/cordova app..
.factory('userservice', function ($http) { return { getusers: function () { return $http.get('https://randomuser.me/api/?results=10').then(function (response) { return response.data.results; }); } } });
unfortunately, code returning 404 when debugging android device and
apphost9623: app couldn’t resolve ms-appx-web://com.ionicframework.ionicblankapp/www/{{item.user.picture.thumbnail}} because of error: data_not_available.
when debugging in windows emulator. can visit url in external browser , see json results. if ctrl+click url in vs editor, internal browser show 'navigation webpage cancelled' , file download warning dialog appears asking if wish open or save api.json result.
i added csp index.html <head>
in hopes problem cordova refusing connection
<meta http-equiv="content-security-policy" content="default-src 'self' data: gap: http://api.openweathermap.org https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
and turned firewall off. no avail. found related issues seemed concern updating web.config iis, unsure how relate android debugger running in chrome.
i'm new both cordova , ionic, forgive me if real rookie problem.
Comments
Post a Comment