Created
          November 5, 2017 12:47 
        
      - 
      
- 
        Save douglaszaltron/ab2a7e0c9134900d9bcc9b121c7d2019 to your computer and use it in GitHub Desktop. 
    Promise loading
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function loading(promise) { | |
| ctrl.submitting = true; | |
| $ionicLoading.show(); | |
| return promise.finally(function onFinally() { | |
| ctrl.submitting = false; | |
| $ionicLoading.hide(); | |
| }); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment