title: BreezeJS editing data not working
body: <p>I was able to follow the instruction on adding data, that part was easy and understandable. But when I tried to follow instructions for editing data, I'm completely lost.</p>
  
  <p>I am following the todo sample, which works quite well, but when I tried to add to my own project using the same principle, nothing works.</p>
  
  <p>in my controller, I have the following:</p>
  
  <pre><code>function listenForPropertyChanged() {
      // Listen for property change of ANY entity so we can (optionally) save
      var token = dataservice.addPropertyChangeHandler(propertyChanged);
  
      // Arrange to remove the handler when the controller is destroyed
      // which won't happen in this app but would in a multi-page app
      $scope.$on("$destroy", function () {
          dataservice.removePropertyChangeHandler(token);
      });
  
      function propertyChanged(changeArgs) {
          // propertyChanged triggers save attempt UNLESS the property is the 'Id'
          // because THEN the change is actually the post-save Id-fixup 
          // rather than user data entry so there is actually nothing to save.
          if (changeArgs.args.propertyName !== 'Id') { save(); }
      }
  }
  </code></pre>
  
  <p>The problem is that any time I change a control on the view, the propertyChanged callback function never gets called.</p>
  
  <p>Here's the code from the service:</p>
  
  <pre><code>function addPropertyChangeHandler(handler) {
      // Actually adds any 'entityChanged' event handler
      // call handler when an entity property of any entity changes
      return manager.entityChanged.subscribe(function (changeArgs) {
          var action = changeArgs.entityAction;
          if (action === breeze.EntityAction.PropertyChange) {
              handler(changeArgs);
          }
      });
  }
  </code></pre>
  
  <p>If I put a break point on the line:</p>
  
  <pre><code>var action = changeArgs.entityAction;
  </code></pre>
  
  <p>In my project, it never reaches there; in the todo sample, it does! It completely skips the whole thing and just loads the view afterwards. So none of my callback functions work at all; so really, nothing is subscribed.</p>
  
  <p>Because of this, when I try to save changes, the manager.hasChanges() is always false and nothing happens in the database.</p>
  
  <p>I've been trying for at least 3 days getting this to work, and I'm completely dumbfounded by how complicated this whole issue has been for me.</p>
  
  <p>Note: I'm using JohnPapa's HotTowel template. I tried to follow the Todo editing functionality to a Tee.. and nothing is working the way I'd like it to.</p>
  
  <p>Help would be appreciated.</p>