javascript - Angular binding for loading doesn't update the HTML -



javascript - Angular binding for loading doesn't update the HTML -

i trying show loading indicator whenever user clicks save button. when button clicked, state changes successfully, reverting value of loading property on scope false state doesn't update ui.

is i'm doing wrong scope properties, or flaw angular?

here's jsbin: http://jsbin.com/xafexorope/2/edit?html,output

the reason why doesnt work because angular's internal dirty-checking loop not fired. it's because utilize standard settimeout. instead of that, either manually phone call $scope.$apply() @ end of settimeout callback, or better, utilize angular wrapper $timeout.

here updated jsbin: http://jsbin.com/devuhovaxa/3/edit

additionally here docs $timeout: https://docs.angularjs.org/api/ng/service/$timeout

javascript angularjs

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -