app.controller("ListController", ['$scope', function($scope) {
$scope.personalDetails = [
{
'fname':'Muhammed',
'lname':'Shanid',
'email':'shanid@shanid.com',
'method':'66666',
'date':'08/08/20117',
//'specieSelected':'ALLIGATOR JUNIPER'
'specieSelected':{
'originalObject': {'code':'','name':'ACACIA SPECIES'},
'title':'ALLIGATOR JUNIPER'
}
},
I have complex variable and multi field. by add personalDetails to watch, the console log does not get fired for every user input. For example, user change fname, I want log it. but it does not.
$scope.$watch('personalDetails', function() {
console.log($scope.personalDetails);
});