I have already made a modal that receives a name, it sends the controller in the function of inserting new contact. I want to check if this data is already registered in the bank so they do not sign it again. Anyone know how I can do this in AngularJS?
I've done this so far ...
//Carrega as categorias existentes
var carregaCategorias = function(){
var tam = $scope.categoria.length;
for (var i = 0; i < tam; i++)
$scope.categorias[i] = $scope.categoria[i].nome;
}
//Verifica se já está inserido
$scope.createCategory = function(typeOfCategory, modalId){ //OK
var typeCategory;
var category = $scope.novaCategoria;
if(category == ?? )