i have ng click event like this :
$scope.submitInfo = function myfunction() {
var itemToAdd = {
Id : generateUUID(),
Name: $scope.Name,
Email: $scope.Email,
Phone: $scope.Phone
};
$scope.Info.push(itemToAdd);
}
my problem is, i want to check if the same ID
or Name
is not already exist in $scope.Info
collection.
i am purly foucs on angular.js, i am looking for best solution for this kind of scenario