Watch for changes to session storage without $interval
<p>I am building an app in which I save data in one controller to session storage, and in my other controllers I use <code>$interval</code> to constantly watch the <code>sessionStorage</code> to check for changes like so.</p>

<pre><code>    $interval(function(){
      vm.myData = JSON.parse(sessionStorage.getItem('patient'));
    }, 300)
</code></pre>

<p>I feel like this is not a good way to keep watching, because, for example, if I want to allow a user to edit some of the data in vm.myData, they cant, as the variable keeps updating itself.  </p>

<p>Is there a way to simply watch the sessionStorage object to see if <code>'patient'</code> has changed? I tried to use the <code>$watch</code> function, but i don't think I quite understand how it works.</p>