With the number of developers we employ and the level of complexity of our projects, it is sometimes hard for people to remember all the constants and defaults for every object. We generally build Typescript Interfaces that assist in this, but sometimes we need more than just definitions, but actual hard data included. Enum to the rescue…. sort of.
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.