Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49223

Remove element doesn't work when get data from web on device

$
0
0

@goliathus wrote:

view

<ion-content>
        <ion-spinner class="contentSpin" icon="lines"></ion-spinner>
        <ion-list>
            <ion-item ng-repeat="test in data">
                        {{test}}
            </ion-item>
        </ion-list>
    </ion-content>

controller

.controller('resultController', function($scope, TimeTable) {

$scope.data = TimeTable.contentsLookUp();

});

Model

.factory('TimeTable', function($http, $ionicLoading, $rootScope, $timeout) {

return {
  contentsLookUp: function() {
      var stationContents
      $http.get(url).then(function successCallback(response) {
           stationContents = response.data
           angular.element(document).find("ion-spinner").remove();
        });
       return stationContents;
    }
};

});

the code works fine on the chrome, but when I run on the device it just show nothing

I test on HTC one with version 4.4.2 and SONY Xperia S with version 4.0.4

also only the "android" spinner show on SONY Xperia S version 4.0.4

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>