This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Description
I was trying to use $mdDialogs bindToController option but it doesn't appear to be working. I checked $scope.myLocal this.myLocal and $scope.ctrl.myLocal but none of them seem to be populated. I also logged the scope it didn't have anything related to my local objects.
I checked $scope.ctrl.myLocal because I found this test which appears to do that but it didn't work.
Also the docs on this are a bit vague they simply say the locals will be copied to the controller. Perhaps a demo using bindToController would be helpful.
Example trying to use `bindToController
$mdDialog.show({
targetEvent: event,
locals: {
Invoice: {...} // I pass a var here
},
bindToController: true,
controller: function($scope, $mdDialog) {
// Nothing seems to have my invoice object
console.log('Invoice:', this, $scope.Invoice, $scope.ctrl)
$scope.done = function() {
$mdDialog.hide()
}
}
})