title: is it possible to dump and restore window.angular to create a restorable snapshot
body: <p>My app requires complex steps within the UX to reach some of its many states. This is making the dev/test cycle extremely cumbersome for simple layout changes which have to be visually verified for a wide range of states.</p>
  
  <p>So, I'm looking into the practicality of taking a dump/snapshot of the running app (ie. window.angular, or perhaps $rootscope) in such a way that I can quickly restore from that snapshot, run a $rootscope.$digest() and et voila. </p>
  
  <p>Any suggestions on how this can be achieved?</p>
  
  <p>I'm not looking for a restored snapshot to be functional, eg it needn't have active watchers or broadcast subscriptions. It just needs to faithfully render a view for visual inspection.</p>
  
  <p><strong>--edit--</strong></p>
  
  <p>I'm starting to think this can't be done.</p>
  
  <p>What I have come to realise is that all of my Angular projects from now on will have a single service called VmStateService, and basically, every single item of VM data that affects the rendered view <strong>must</strong> live in this single service, which is injected into every controller. That way I only have a single, clean object (it has no functions), that I can dump to a string, or save to local storage, and restore to create any view that I want to test.</p>
  
  <p>I guess it's unfortunate that everybody learns AngularJS by doing $scope.foo = "bar", and then spends the rest of their career realising what a mess that creates.</p>