here i'm using Array for avoiding duplicate data for that i wrote this code if (EmployeeList.indexOf(EmpDetails) == -1)
Here im Getting Error as EmployeeList of Array is not defind
$scope.EmployeeList = [];
$scope.SaveDb = function (Isvalid) {
var EmpDetails = [{
'EmpName': $scope.EmpName,
'Email': $scope.Email
}]
$scope.EmployeeList.push(EmpDetails);
console.log($scope.EmployeeList);
}
}
})