tastejs/todomvc — pull request #641 by Foxandxss (2013-07-29 15:22:36+00:00)
Title: AngularJS - Add a check for changes to prevent unneeded saves.

Since the `$watch` will be fired every time that a `todo` changes and assigning the `todos` from the `localStorage` is considered a change, I consider that is a waste of resources (no that big in this case) to load the data and immediately save them again (because the `$watch`).

So I put a check to see if the todos has been changed before save them again. So the first time we load them, they won't be saved again.

Merge this PR if you find it interesting :)