material icon indicating copy to clipboard operation
material copied to clipboard

RC4: ng-messages isn't shown when form is submitted, but input is untouched

Open chr22 opened this issue 11 years ago • 3 comments

Try and push the submit button in this CodePen and see that the message is set into DOM but its opacity is 0.

It will need something along the lines of:

form.ng-submitted [ng-messages] {
    opacity: 1;
}

chr22 avatar Nov 16 '15 09:11 chr22

The behaviour of showing the error messages changed silently: Compare the "Errors" section on 0.11.4 with 1.0.0-rc4. Now it seems to be aligned with the attribute description of the md-is-error attribute on the md-input-container API page.

However there has not been any hint in the changelog. This was discussed several times I think, so is this an Issue or a fix?

michaelkrone avatar Nov 17 '15 16:11 michaelkrone

+1 for this

Can anyone provide a working example of how md-input-container now works with ng-messages?

datak1d avatar Nov 20 '15 09:11 datak1d

You can use md-is-error on the md-input-container as such:

md-is-error="userForm.$submitted && userForm.area.$invalid"

chronixlo avatar Nov 20 '15 09:11 chronixlo