title: Angularjs data binding with a data attribute object
body: <p>I have some json attached to a data attribute on a page. The json data is used to build a table in angularjs.
  I'm using coffeescript and haml.</p>
  
  <pre><code>    app = angular.module("myApp", [])
  
      app.controller "TableCtrl", ($scope) -&gt;
        $scope.table =  $("#mydata").data("myjson")
  
  
      #table{"ng-app"=&gt;"myApp","ng-controller" =&gt;"TableCtrl"}
        %table
          %tbody
            %tr{"ng-repeat"=&gt;"(i,item) in table" }}"}
              %td {{item.name}}
  </code></pre>
  
  <p>The page loads the data into a table. Elsewhere on the page the json on the data attribute can be changed by a user with jquery. How can I have 2-way binding between the json data and the table? i.e I want the table to change as the json on the data attribute is changed locally.</p>