For the first half of this, I followed the instructions in this blog article, which were actually quite good (THANK YOU to you people who write stuff like this, seriously…).
This site and all of its contents are referring to Angular JS (version 1.x), if you are looking for the latest Angular, please visit
A large category of frontend applications are very form-intensive, especially in the case of enterprise development.
Many of these applications are basically just huge forms, spanning multiple tabs and dialogs and with non-trivial validation business logic.
This is why poorly coded Java Script can freeze a web page.
Instead, whenever there is a task that takes some amount of time, such as an Ajax request, waiting for a click event, or setting a timeout, we set up a callback function and finish our current turn.