Example $watch() Method

Register an extra hobby for Stuart. The hobbies are stored in an array inside the 'value' object. The $watch() method is triggered because the 'deep' option is set to 'true' so that the watcher also detects changes further inside the object.

Register an extra hobby for Stuart:

    Current 'value' object:

    {
      "owner": "Stuart",
      "address": "Faraway Lane",
      "hobbies": [
        "Bird watching",
        "Trail running"
      ]
    }