anchor.diff:  
     $scope.changeCreditCard = function () {
       $scope.pendingPlan = $scope.me.plan;
  -    $modal({template: '/assets/account/credit_card.html', persist: true, show: true, backdrop: 'static', scope: $scope});
  -  }
  +    $scope.showCreditModal();
  +  }
  +
  +  var creditCardModal = $modal({template: '/assets/account/credit_card.html', persist: true, show: false, backdrop: 'static', scope: $scope});
  +
  +  $scope.showCreditModal = function () {
  +    creditCardModal.$promise.then(creditCardModal.show);
  +  }
  +
  +  $scope.hideCreditModal = function () {
  +    creditCardModal.$promise.then(creditCardModal.hide);
  +  }
  +
  +  $scope.$on('creditCardSubmit', function( event){
  +    $scope.hideCreditModal();
  +  });
  +
  +  $scope.$on('openModal', function( event){
  +    console.log("open modal");
  +    $scope.showCreditModal();
  +  });
   
     $scope.toggleDetails = function($event) {
       var btn = $($event.target);
  
positive.code:           $location.path('/account');
          });
        });
        $modal({template: '/assets/account/credit_card.html', persist: true, show: true, backdrop: 'static', scope: $scope});
      }
    };
  }])
  
negative.code:         if ($scope.onDemandRequiresCC) {
            $scope.$emit('userHasValidCC', data);
          }
        });
      }
    }
  