There is an object in which data from the view is collected, then I want to transfer this data to various functions, but when I do as described below, the object does not default to two way binding, and I have to use watch, if there is another way, and variations of the implementation of such same behavior.
var defaultOption = { some: $ctrl.option1, some2: $ctrl.option2 } $scope.$watchGroup(['$ctrl.option1','$ctrl.option2'],myFunc); function myFunc() { defaultOption = { some: $ctrl.option1, some2: $ctrl.option2 } } // Затем я вызываю нужные функции myFunc1(defaultOption) myFunc2(defaultOption) ... The problem is that the data is not correct