Hi 
I have list of articles (have 2 array) , now I want to add new article to 
it (have 4 array) with click on button . between this adding ,
I want to compare if there is the same value(between new value and old 
value) , don't add to list . I use 2 each function for each of them but I 
don't get true response .
Should I use for loop for this ? Please guide me .

$scope.articles: Array[2]
resp: Array[4]

$scope.moreBtn = function(){

$.each(resp, function(e, val) {

$.each($scope.articles, function(index, value) {

 if ($scope.articles[index].Title != resp[e].Title) {

                $scope.articles.push(resp[e]);

 }

}

}

}


So Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to