I have a dropdown with a checkbox that its values is an object. (see attached)
Each time I select an object there is a watch which pastes this new values (which is an array of selected objects) to another object that display it in a directive (binding) -- tiles
$scope.$watch('skills', function(newVal, oldVal) {
if (newVal) {
console.log('changed!!! old value: ' + oldVal + ' new val ' + newVal);
if (newVal === undefined) {
return;
}
$scope.tiles = _.cloneDeep(newVal);
}
}, true);
angular.module('dsadad')
.component('tiles', {
templateUrl: 'tile.tpl.html',
bindings: {
tiles: '<',
onDelete: '&?'
},
controller: function ($state, _, $scope, $log, Utils, $translate, moment) {
'use strict';
var $ctrl = this;
}
});
I get: rangeError Maximum call stack size exceeded
for some reason one of the value of the array of selected objects is an array also instaed of an object as you can see....
