我有一个$ http请求,用于加载标记的信息.我想显示某种加载掩码/图像,但我希望它只显示在页面的受影响部分.
HTML
$scope.$watch('widgetType.id', function(newValue, oldValue) { if(newValue) { $scope.loadingVariants = true; console.log("Getting variants from server"); $timeout(function() { // only here for debug purposes $http.get('/api/widget-variants/?widget=' + newValue) .success(function (data) { $scope.allVariants = data; $scope.loadingvariants = false; }).error(function (data) { $scope.loadingvariants = false; }); }, 1000); } else { $scope.allVariants = []; } });
我希望#needs-loading-mask被一个加载掩码遮挡而$ scope.loadingVariants为真,但我无法弄清楚如何让它浮动选择,使用声明性语法填充父字段集.
#needs-loading-mask
我无法删除选择字段,因为它会对Tab顺序造成严重破坏,但似乎应该可以在它前面浮动一些东西.