Answer the question
In order to leave comments, you need to log in
Angularjs: how to defeat repeated calls when using $watchCollection?
Hello !
There is a large form, with elements dependent on each other. When changing form values, you need to send a request to receive a response from the server.
$scope.form = {};
$scope.$watchCollection('form', function(form){
if ( ! form.brandId && form.modelId){
delete form.modelId;
}
console.log('load data ...');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question