0
Something really weird is happening, first time this happens. I have a registration form. when I click save, the console appears 'Undefined' and aligns... Impossible to be 'Undefined' because there are data filled in!!! See below:
HTML
<form name="formAddress" ng-controller="InicialCtrl">
<label>Nome do estabelecimento</label>
<input class="form-control" type="text" name="name" mg-model="estabele.nome">
<label>CEP</label>
<input class="form-control" type="text" name="cep" mg-model="estabele.cep">
<label>Endereço</label>
<input class="form-control" type="text" name="address" mg-model="estabele.and" >
<label>Cidade</label>
<input class="form-control" type="text" name="city" mg-model="estabele.cidade" >
<label>UF</label>
<input class="form-control" type="text" name="uf" mg-model="estabele.uf" >
<label>Contato</label>
<input class="form-control" type="text" name="phone" mg-model="estabele.telefone">
<button class="btn btn-block btn-primary btnRegister" ng-click="cadastro(estabele)">Cadastrar</button>
</form>
controller:
app.controller("InicialCtrl", ['$scope', '$http', '$window', '$location', '$rootScope', function ($scope, $http, $window, $location, $rootScope) {
$scope.cadastro = function(estabele){
console.log(estabele);
}
}]);
It’s really old... thanks... I think that from writing these directives so much, we write so fast that we do not realize when we write wrong and then we kill ourselves to find the problem thinking that everything is right and we do not look at the most obvious things kkkkk .
– GustavoSevero
I share these hahahaha slips
– Giovane