Show a loading spinner while we're waiting for subscription information.
This commit is contained in:
parent
755fc168af
commit
c7e83c4d41
3 changed files with 11 additions and 1 deletions
|
@ -445,10 +445,16 @@ function UserAdminCtrl($scope, Restangular) {
|
|||
planDict[$scope.plans[i].stripeId] = $scope.plans[i];
|
||||
}
|
||||
|
||||
$('.spin').spin();
|
||||
|
||||
$scope.loading = true;
|
||||
var getSubscription = Restangular.one('user/plan');
|
||||
getSubscription.get().then(function(sub) {
|
||||
// User has a subscription
|
||||
$scope.subscription = sub;
|
||||
$scope.loading = false;
|
||||
}, function() {
|
||||
$scope.loading = false;
|
||||
});
|
||||
|
||||
$scope.subscribe = function(planId) {
|
||||
|
|
Reference in a new issue