V
V
Vassa2014-06-25 13:59:44
Angular
Vassa, 2014-06-25 13:59:44

How to initialize input type="email" ?

Actually, the problem of initializing input type="email" is doing everything in the same way with input type="text" but the field is not initialized anyway, what could be the problem?

<input class="d-form__input-text"
           name="email"
           type="email"
           ng-model="email"
           ng-init="email='[email protected]'"
           value="[email protected]"
           ng-required="true"
           ng-pattern="{{EMAIL_REGEXP}}">

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vassa, 2014-06-25
@Mr_Pukin

Update:
Initialized only with valid "[email protected]" value, if I try to initialize "email.com" the data is not displayed at all in the input. And I just need to display a form with invalid data that the user posted the form earlier.

K
kompi, 2014-06-25
@kompi

I would not recommend using native type="email" - some clients have complained that some email addresses are always invalid. Better use plain type="text".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question