Bom dia, Sou iniciante em angularjs e html, criei um formulário e coloquei quais as validações que o mesmo deveria ter. No botão enviar eu utilizei o ng-disabled, mas mesmo que todos os campos estejam validos o botão continua desabilitado.
Estou enviando meu código completo.
Alguém consegue me ajudar?
<form novalidate
name="customerForm"
ng-submit="controller.generateXMLCliente()">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="row" style="margin-bottom: 10px">
<div class="col-md-4">
<div class="form-group">
<div class="col-xs-12">
<label for="cbPlanos" class="col-sm-2 control-label blue-font" style="width: 100%">Selecione o Plano:*</label>
<select class="form-control"
name="cbPlanos"
ng-model="controller.customer.plano"
>
<option>1 Mega</option>
<option>2 Megas</option>
<option>3 Megas</option>
<option>5 Megas</option>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtCpf.$invalid && !customerForm.txtCpf.$pristine }">
<div class="col-xs-12">
<label class="col-sm-2 control-label blue-font" ng-show="controller.pessoaFisica">CPF:*</label>
<input class="form-control"
name="txtCpf"
required
placeholder="CPF"
ui-mask="999.999.999-99"
ng-show="controller.pessoaFisica"
ng-model="controller.customer.cpf"
ng-minlength="11"
ng-maxlength="11"
type="text">
</div>
</div>
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtCnpj.$invalid && !customerForm.txtCnpj.$pristine }">
<div class="col-xs-12">
<label for="txtCnpj" class="col-sm-2 control-label blue-font" ng-show="!controller.pessoaFisica">CNPJ:*</label>
<input class="form-control"
type="text"
name="txtCnpj"
placeholder="CNPJ"
ui-mask="99.999.999/9999-99"
ng-show="!controller.pessoaFisica"
required
ng-model="controller.customer.cnpj"
ng-minlength="14"
ng-maxlength="14">
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtNome.$invalid && !customerForm.txtNome.$pristine }">
<div class="col-xs-12">
<label for="txtNome" class="col-sm-2 control-label blue-font" ng-show="controller.pessoaFisica">Nome:*</label>
<input type="text"
class="form-control"
name="txtNome"
placeholder="Nome Completo:"
ng-show="controller.pessoaFisica"
required
ng-model="controller.customer.nome"
ng-minlength="5">
</div>
</div>
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtRazaoSocial.$invalid && !customerForm.txtRazaoSocial.$pristine }">
<div class="col-xs-12">
<label for="txtRazaoSocial" class="col-sm-2 control-label blue-font" ng-show="!controller.pessoaFisica" style="width: 100%">Razão Social:*</label>
<input type="text"
class="form-control"
name="txtRazaoSocial"
placeholder="Razão Social:"
ng-show="!controller.pessoaFisica"
required
ng-model="controller.customer.razaoSocial"
ng-minlength="5">
</div>
</div>
</div>
</div>
<div class="row" style="margin-bottom: 10px">
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtCep.$invalid && !customerForm.txtCep.$pristine }">
<div class="col-xs-12">
<label for="txtCep" class="col-sm-2 control-label blue-font">CEP:*</label>
<input type="number"
class="form-control"
name="txtCep"
placeholder="Informe apenas números"
required
ng-model="controller.customer.cep"
ng-pattern="/^\d{5}\-?\d{3}$/">
<p ng-show="customerForm.txtCep.$invalid && !customerForm.txtCep.$pristine"
class="help-block">
Informe apenas números! Ex.: 34101100.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtEndereco.$invalid && !customerForm.txtEndereco.$pristine }">
<div class="col-xs-12">
<label for="txtEndereco" class="col-sm-2 control-label blue-font">Endereço:*</label>
<input type="text"
class="form-control"
name="txtEndereco"
placeholder="Rua, Avenida, etc"
required
ng-model="controller.customer.endereco"
ng-minlength="3">
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtNumero.$invalid && !customerForm.txtNumero.$pristine }">
<div class="col-xs-12">
<label for="txtNumero" class="col-sm-2 control-label blue-font">Número:*</label>
<input type="text"
class="form-control"
name="txtNumero"
placeholder="Apenas números"
required
ng-model="controller.customer.numero"
ng-pattern="/^\d+$/">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<div class="col-xs-12">
<label for="txtComplemento" class="col-sm-2 control-label blue-font">Complemento:</label>
<input type="text"
class="form-control"
name="txtComplemento"
placeholder="Apartamento, quadra, etc:"
ng-model="controller.customer.complemento">
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtBairro.$invalid && !customerForm.txtBairro.$pristine }">
<div class="col-xs-12">
<label for="txtBairro" class="col-sm-2 control-label blue-font">Bairro:</label>
<input type="text"
class="form-control"
name="txtBairro"
required
ng-model="controller.customer.bairro">
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="col-xs-12">
<label for="cbCidades" class="col-sm-2 control-label blue-font">Cidade:*</label>
<select class="form-control" id="cbCidades" ng-model="controller.customer.cidade">
<option>Janaúba</option>
<option>Jaíba</option>
</select>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 10px">
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtTelefone.$invalid && !customerForm.txtTelefone.$pristine }">
<div class="col-xs-12">
<label for="txtTelefone" class="col-sm-2 control-label blue-font">Celular:*</label>
<input type="text"
class="form-control"
name="txtTelefone"
placeholder="(00)0000-0000"
required
ng-model="controller.customer.celular"
ng-pattern="/^\(?\d{2}\)?\d{4,5}\-?\d{4}$/">
<p ng-show="customerForm.txtTelefone.$invalid && !customerForm.txtTelefone.$pristine"
class="help-block">
O celular deve ser informado com ddd + número do telefone. Ex.: (xx)99999-9999 ou xx98888-8888 ou xx988887777.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group"
ng-class="{ 'has-error' : customerForm.txtEmail.$invalid && !customerForm.txtEmail.$pristine }">
<div class="col-xs-12">
<label for="txtEmail" class="col-sm-2 control-label blue-font" style="width: 100%">E-mail:*</label>
<input type="email"
class="form-control"
name="txtEmail"
placeholder="E-mail:"
required
ng-model="controller.customer.email"
ng-pattern="/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/">
</div>
</div> t
</div>
<div class="col-md-4"></div>
</div>
<div class="row" style="margin-top: 10px">
<div class="col-md-4">
<div class="form-group">
<div class="col-xs-12">
<button type="submit" class="btn btn-assine-ja" ng-disabled="customerForm.$invalid">ASSINAR</button>
</div>
</div>
</div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
</div>
</div>
<div class="col-md-1"></div>
</div>
</form>