A
A
artekha2017-02-11 20:10:40
JavaScript
artekha, 2017-02-11 20:10:40

Why js expression is not passed to ng-show?

Hello, you need to do validation on the first angular. Everything works except one:

<div ng-show="authForm.password.$touched && authForm.password.$invalid && authForm.password.value.length < 6" class="input__error">Password should be at least six characters</div>

authForm - form name
password - input name
Without this expression, everything works, but I need the user to enter at least 6 characters:
authForm.password.value.length < 6

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question