I am using calling function Save_Click in Angular controller on button click.
Following is the sequence of execution
Line Code
1 Declare a variable V1
2 console.log(V1)
3 Perform a server post back, and assign a value to V1 depending on the values the service returns. console.log(V1)
4 console.log(V1)
What I see is that - in console #4 is printed before - #3 Also the value assigned in #3 is not printed in #4.
What could be the reason? What I am doing wrong? I get the same issue if I use $localStorage (ngStorage) library too.
Note - I am using Visual Studio/.Net solution to host the angular application in my Index.cshtml.
asyncandawaitfeature. javascript.info/async-await