AngularJS - Forcing bind field input

1

Good afternoon guys! I read that by default AngularJS requires fields to have some user interaction to perform binding. how do I ignore this and send what I have in the input field, even without interaction with the user? Thank you.

My JavaScript is in hmtl itself, I use the code from this site. link

However, I have a sterno file inside the controller folder (laravel 5), called cadastro.js the save function inside the cadastro.js is this.

"self.email = {};     self.salvar = function () {         var errors = [];         // Validations         if (! self.email.email) {             errors.push ('The Email field is required');         }

    if (!self.email.contato) {
        erros.push('O campo Contato é obrigatório');
    }

    if (erros.length > 0) {
        alertService.add('danger', erros);
    }
    else {
        $uibModalInstance.close(self.email);
    }

}; "

Here are some of the fields inside my html that use angularjs functions. "

   Zip code       

Address     "

    
asked by anonymous 25.04.2016 / 21:11

0 answers