How can I bind an angular-data model via Model.bindOne() to a scope when using controller as syntax?
This works if I inject $scope:
MyModel.bindOne( $scope, 'myModel', myId ); // Works as expected
But when using controller as, I would almost expect to be able to do the following:
MyModel.bindOne( this, 'myModel', myId ); // TypeError: undefined is not a function
I had the same problem, this worked for me. Referencing the solution provided by the author of js-data in this issue:
myModel is now available in your controller.