angularjs - External json parser before the hearing is visible -


i want external json before view visible , active, $ http.get not work until view visible. i'm dealing $ ionicview.beforeenter

$scope.$on('$ionicview.beforeenter', function () {                 var value = window.localstorage.getitem("url_id");                 var values = value.split("//");                 $scope.url_id = values[1];                     $http.get(categoriadatos.local + $scope.url_id).then(function (resp) {                     $scope.local = resp.data;                  }, function (err) {                     console.error('err', err);                 })      }); 

once view active , visible method works , gets data.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -