Recently, I needed a good way to find out exactly what had changed between two objects in an Angular application. Soooo, I wrote one.
As an example scenario, let’s say we are editing a post. We load our page and pull down our post from the server. We make an initial copy of the and append another copy to our view. A user will edit a couple of values, e.g. the title and the description. At this point, I only want to send to the server the updated values rather than the entire post object, so I’d like to find the difference between the view-bound object and our original copy.