Unable to update the View in AngularJs using SweeAlert (angular-sweetalert) Calling twice updates the view.Why?
<p>I am using <a href="http://leftstick.github.io/angular-sweetalert/" rel="nofollow">angular-sweetalert lib</a> for showing popup in my app. </p>

<pre><code>function _changeEmailAddress() {
         sweet.show({
             title: "Change Email Address",
             text: "Write your email address:",
             type: "input",
             showCancelButton: true,
             closeOnConfirm: false,
             animation: "slide-from-top",
             inputPlaceholder: 'Enter e mail address'
         },
           function (inputValue) {
               if (inputValue === false) return false; if (inputValue === "") {
                   sweet.showInputError("You need to write Email address!"); return false
               }

               at.user.email = inputValue;
               var ret = userProfileFactory.updateUserEmailAddress(at.user)
                   .success(function (data) {
                       sweet.show("Accepted!", "You wrote: " + inputValue, "success");
                       at.user.pendingEmailVerification = true;
                   })
               .error(function (err) {
                   sweet.showInputError("You need to write proper Email address!"); return false
               });
           }); 
     }
</code></pre>

<p>here is the view: </p>

<pre><code> &lt;button class="btn btn-default" ng-click="at.changeEmailAddress()"&gt;Change&lt;/button&gt;
</code></pre>

<p>The problem which i am facing is, whenever i call changeEmailAddress function, place my input and then press Okay. 
it comes in the function(input) and i change the value in "at.user.email" what user has input.</p>

<p>It changes in the back-end, but doesn't update in the view. 
When I click again and then it updates the view.</p>

<p>I am not using $scope, $rootScope, as  <a href="http://johnpapa.net/angular-style-guide/" rel="nofollow">John Papa Blog </a> has mentioned in his blog. But he didn't mentioned that how to resolve when calling ngDialog, or SweetAlert type services. </p>

<p>Please help how can I refresh my view and display the latest change in the model. </p>

<p>Advance Thanks.</p>