コントローラーでこの関数を使用してデータを取得しています:
var fetchStoreItems = function () {
return $http.get('/enterprises/_store').then(function (response) {
$scope.items = response.data;
}, function (errResponse) {
console.error("Error while fetching data")
})
};
それはうまく機能し、十分に高速です。しかし、フェッチするアイテムがたくさんある場合はどうなりますか?! データの取得中にスピナーを置きたい。
これどうやってするの?