I haven't got an answer for your problem, but I have another solution for your problem, here is a plnkr
I made a directive called networkInfo which sets the buttons content depending on whether the network call is being made or not.
It's not the perfect way, but a link function in 7 lines, and a button with two attributes on it ain't half bad.
The attribute makingCall is just a boolean of whether the call is being made.
The attribute networkInfo initiates the directive and fires the link function binding makingCall to its scope.
The function update() uses $timeout to imitate an asynchronous network call (using $http or something).
Firstly it checks vm.working, if it is true then don't make another network call. Then it sets it to true, to inform the directive that a call is now in process.
Finally it fires the $timeout which after 2secs will set vm.working back to false to indicate the end of the network call.
Obviously I have used boostrap because that is what i'm more familiar with, however, like iconic its just stylings.
isSavingcome from? – Callum Linington Jan 22 '15 at 13:43if (isSaving) return;– Callum Linington Jan 22 '15 at 13:46