I'm using angularJS and I have a problem: I have 2 $scope:
$scope.list1{
Object 1,
Object 2,
Object 3}
$scope.list2{
Object 4,
Object 5,
}
and I want this result:
$scope.res{
Object 1,
Object 2,
Object 3,
Object 4,
Object 5}
I don't know what function to use in agularJS, I did use
angular.merge($scope.res, $scope.list1, $scope.list2)
but I got empty result I don't know if merge is the good function so I need your help
$scope.list = [obj1, obj2, obj3];and there are objects$scope.list1 = { key: obj1, key: obj2 };. You are saying list, so arrays perhaps? But you are using curly brackets, so probably objects then? But there are no key/values so perhaps arrays anyway? As the question reads right now the answer you need is: Go and read some basic javascript tutorial that explains arrays and objects, and then please come back and try again! (Or you could edit your question and add valid data.)