mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Can now search and view tournaments. Can now view team scores, weights and seeds, mats and bout board
24 lines
748 B
JavaScript
24 lines
748 B
JavaScript
(function(){
|
|
app.directive('usSpinner', ['$http', '$rootScope' ,function ($http, $rootScope){
|
|
return {
|
|
link: function (scope, elm, attrs)
|
|
{
|
|
$rootScope.spinnerActive = false;
|
|
scope.isLoading = function () {
|
|
return $http.pendingRequests.length > 0;
|
|
};
|
|
|
|
scope.$watch(scope.isLoading, function (loading)
|
|
{
|
|
$rootScope.spinnerActive = loading;
|
|
if(loading){
|
|
elm.removeClass('ng-hide');
|
|
}else{
|
|
elm.addClass('ng-hide');
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
}]);
|
|
}).call(this); |