title: Initializing AngularJS $resource with in-page JSON
body: <p>I'm using AngularJS' $resource to fetch and update an object. To save a round trip on page load, I have the JSON object in a variable on the page. How can I initialize the $resource with this data rather than calling $get?</p>