search

Home  >  Q&A  >  body text

angular.js - angularjs + ajax data is not refreshed, why

The data binding of angularjs is very easy to use. The company wants to develop SDK. Due to history, angular needs to be combined with ajax. However, after ajax, angularjs does not refresh the page data when data is assigned, but the data appears again after clicking. I know why,

習慣沉默習慣沉默2827 days ago517

reply all(2)I'll reply

  • 黄舟

    黄舟2017-05-15 16:54:25

    Get the data to $scope.xxx 之后 $scope.$digest Give it a try, I have also encountered such a thing.

    reply
    0
  • PHP中文网

    PHP中文网2017-05-15 16:54:25

    http://stackoverflow.com/a/21128340/2586541

    reply
    0
  • Cancelreply