-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug(md-error/md-hint): It isn't being displayed below tag #5292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See #5263 (comment) |
@willshowell For me, it's really strange... even if I use it with |
As you can see here, Unfortunately, I don't know the history of that behavior, but maybe worth filing an angular issue for. |
@willshowell That's really a bad thing :( Now I'm wondering if it's an issue or the expected behavior. My real situation is the following: I have a lot of inputs inside my components, like this:
I have a reusable component named "form-validation" with this template:
Since it doesn't seem possible to do this (to use
|
The angular material document says that "If an input element can have more than one error state, it is up to the consumer to toggle which messages should be displayed. This can be done with CSS, ngIf or ngSwitch."
|
@webUIdevelopment You may have to organize it like this: <input mdInput required>
<md-error>{{ currentError(switchCase) }}</md-error> currentError(val) {
switch (val) {
// ...
}
} ...or this As far as I can understand, support for dynamic content projection will help angular/angular#8563 once it's available |
See #5263 (comment) as @willshowell said for an explanation |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Uh oh!
There was an error while loading. Please reload this page.
Bug, feature request, or proposal:
Bug.
What is the expected behavior?
md-error
andmd-hint
should display below thetag
when it's wrapped by another tag.What is the current behavior?
If you wrap
md-error
ormd-hint
with any tag, it doesn't work as expected, it appears inside element itself.What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue.
http://plnkr.co/edit/8QgsyvGx93l9YpucZZ0w?p=info
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.2.4
Material: Material2#beta.7
OS: Linux
Typescript: 2.3.4
Browser: Only tested in Chrome
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: