Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 1
    Ohh I see, with that Angular is confuse with the directive.... You're 100% right. I didn't think of that. Thanks. Commented Apr 11, 2017 at 18:21
  • @ihue and that was a reason of weird behavior? Commented Apr 11, 2017 at 18:26
  • I still see the same issue after updating my code base on your suggestion, you may see it here : jsfiddle.net/bheng/Ln3tqzcu Commented Apr 11, 2017 at 18:35
  • 1
    @ihue Few changes (from my answer, but I have added it later and maybe you didn't see them) and I think it work like you expect: jsfiddle.net/od62sshv/3 BTW I think Plunker is better for Angular related simple examples, moreover Plunker is written in Angular :) Commented Apr 11, 2017 at 19:21
  • 1
    @Pneumokok your fiddle is exactly what I meant in my previous comment when I said "is looking in the wrong place for data to validate". I think you should include the fiddle in the answer, and this will be the right one. Just a note: there's no need to add ng-specific classes to the input fields, since angular inject them automatically based on the required spec. Commented Apr 12, 2017 at 6:33