Material: Input validation with ng-message does not work correctly inside of a md-dialog

Created on 12 May 2015  Â·  2Comments  Â·  Source: angular/material

Basically anything with the ng-message directive is shown no matter what is inside the input field. See attached code pen: http://codepen.io/anon/pen/oXbKrJ

docs integration

Most helpful comment

Have you tried with angular-message? Basically, this is not contained in angular. So, you have to add this for using this module like as angular-aria.js and angular-animate.js. and should add ngMessages into module dependencies.

Here is modified codepen:
http://codepen.io/ligeek/pen/XbPwZo

All 2 comments

Have you tried with angular-message? Basically, this is not contained in angular. So, you have to add this for using this module like as angular-aria.js and angular-animate.js. and should add ngMessages into module dependencies.

Here is modified codepen:
http://codepen.io/ligeek/pen/XbPwZo

Oh, I guess I assumed that angular material would have listed it as a
dependency since it was used in an example within the docs. Maybe the docs
should be updated so people don't make my assumption again? Anyway, thanks!

On Thu, Jul 23, 2015, 4:00 AM Jinyoung Kim [email protected] wrote:

Have you tried with angular-message
https://docs.angularjs.org/api/ngMessages? Basically, this is not
contained in angular. So, you have to add this
http://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-messages.js
for using this module like as angular-aria.js and angular-animate.js. and
should add ngMessages into module dependencies.

Here is modified codepen:
http://codepen.io/ligeek/pen/XbPwZo

—
Reply to this email directly or view it on GitHub
https://github.com/angular/material/issues/2820#issuecomment-124038447.

Was this page helpful?
0 / 5 - 0 ratings