Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Error when using placeholder on input without md-input-container #1290

Closed
pcassis opened this issue Jan 26, 2015 · 7 comments
Closed

Error when using placeholder on input without md-input-container #1290

pcassis opened this issue Jan 26, 2015 · 7 comments
Milestone

Comments

@pcassis
Copy link

pcassis commented Jan 26, 2015

Placeholder require mdInputContainer so when input is not wrapped with md-input-container it gives:

Error: [$compile:ctreq] Controller 'mdInputContainer', required by directive 'placeholder', can't be found!

Preview (check console or remove placeholder):
http://plnkr.co/edit/TB7XDPRkyvAez0MrUpC3?p=preview

@aaronchar
Copy link

Having the same issue.

@marcysutton
Copy link
Contributor

Maybe related: #1279

@naomiblack naomiblack modified the milestone: 0.8.0 Jan 26, 2015
@vertazzar
Copy link

it's because the "placeholder" is now an angular directive

<anything placeholder="foobar"></anything> will throw an error if you don't wrap it in the md-input-container directive

@aaronchar
Copy link

@vertazzar Exactly the issue.

@pcassis
Copy link
Author

pcassis commented Jan 27, 2015

If it's impossible to overwrite default behavior only when it's wrapped with md-input-container then maybe it would be better to prefix (md-) these directives? Sometimes you need to use default html behavior and now it's impossible.

@ajoslin
Copy link
Contributor

ajoslin commented Jan 27, 2015

Oh, good call. I didn't think of the fact that it would break in other cases.

@ajoslin
Copy link
Contributor

ajoslin commented Jan 27, 2015

Fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants