Show a loading spinner while we're waiting for subscription information.

This commit is contained in:
yackob03 2013-10-02 01:03:48 -04:00
parent 755fc168af
commit c7e83c4d41
3 changed files with 11 additions and 1 deletions

View file

@ -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) {