In the final stages of development, systems that may get quick tweaks in real-time, where a bug has stopped the flow of business and the developer needs to get the fix in place ASAP. The client doesn’t know to hit Ctrl+F5 and his browser is just showing them the same code as they had. You can generally override the browser cache by adding a querystring, but then you have to dig around and get rid of them, or even change them more than once. Here’s a solution.
The Angular feature $watch has become known for its tendancy to hog memory, so we’ve been avoiding it wherever we can. However, with Components, the fact that you may only have a few bound values makes it much more necessary to have a watch on a value. There is a very easy way to do this.
A part we got stuck on recently was regarding binding functions to the component from the parent controller. Each component can have its own controller, so you can put all sorts of nice events within the controller, but sometimes you need to access a tool from outside. Here’s how (and why) we did this.