Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks like you are trying to confirm a password in a form. There are many ways that you can go about this without resorting to JSON to pass values around in AngularJS. The most useful resource I've found online is from this Google Group thread:</p> <blockquote> <p>1) <a href="http://jsfiddle.net/pkozlowski_opensource/GcxuT/23/" rel="nofollow noreferrer">http://jsfiddle.net/pkozlowski_opensource/GcxuT/23/</a> will compare value in a second field with <em>model</em> value of the first field </p> <p>2) <a href="http://jsfiddle.net/S8TYF/" rel="nofollow noreferrer">http://jsfiddle.net/S8TYF/</a> will compare value in a second field with <em>input</em> value of the first field</p> <p>The difference might be subtle but has practical consequences: with (2) the confirm validation will kick-in as soon as you start typing anything in the first field. With (1) the confirm validation will kick-in only after the first field is valid. In the e-mail confirm example it means that you won't start showing confirmation errors till e-mail validation errors are sorted out (so a user can focus on one error at the time).</p> </blockquote> <p>Source: <a href="https://groups.google.com/d/msg/angular/R4QeNsNksdY/migbplv8GxIJ" rel="nofollow noreferrer">https://groups.google.com/d/msg/angular/R4QeNsNksdY/migbplv8GxIJ</a></p> <p>From the <a href="http://jsfiddle.net/pkozlowski_opensource/GcxuT/23/" rel="nofollow noreferrer">first link</a>, the directive is used as follows:</p> <pre class="lang-html prettyprint-override"><code>&lt;label&gt;e-mail&lt;/label&gt; &lt;input name="email" type="email" required ng-model="email"&gt; &lt;label&gt;repeat e-mail&lt;/label&gt; &lt;input name="emailRepeat" type="email" required ng-model="emailRepeat" ui-validate-equals="email"&gt; </code></pre> <p>Where the <code>ui-validate-equals</code> directive points to the <code>email</code> model that was defined in the first input.</p> <p>There are some <a href="https://stackoverflow.com/a/14012512/586621">StackOverflow answers</a> to this if you would like to look there as well for additional ideas to solve your problem.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload