After some research in the past two days, it seems that promises other than angularjs are used to make data requests, and angularjs cannot monitor it. Your code uses $.ajax(), so you need to force a refresh. If you use $http.get() to request data, you should not need $apply to refresh.
Also, can you send out your API interface? Just what I need!
After obtaining the data, apply it to force refresh. I also encountered it a few days ago, and I don't know why. . .
================================Supplement================== ===================
After some research in the past two days, it seems that promises other than angularjs are used to make data requests, and angularjs cannot monitor it. Your code uses $.ajax(), so you need to force a refresh. If you use $http.get() to request data, you should not need $apply to refresh.
Also, can you send out your API interface? Just what I need!
http://www.angularjs.cn/A0a6
You need $apply
You can try this, initialize
$scope.weather = {};
at the beginning of the controller function