Skip to content
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

Input element with mdInput inside md-input-container does not display the placeholder when field is empty #3235

Closed
rahulsethi-daffodilsw opened this issue Feb 22, 2017 · 3 comments

Comments

@rahulsethi-daffodilsw
Copy link

Input element with mdInput inside md-input-container does not display the placeholder when field is empty

Just started with Angular 2 and material design after working with material in React.js apps. First impression of angular/material2 does not seem to be good as it's React counterpart.

So here's what is happening... there is no grey placeholder when the input field is empty and unfocused. Please see the image below:
angular2-md-bug

It only jumps out above when the field is not empty or focused

angular2-md-bug2

Here is the code below:

import { Component } from '@angular/core';
import '../styles/styles.scss';

@Component({
  selector: 'my-app',
  template: `<div>
      <p>
      <md-input-container>
        <input mdInput placeholder="Name" />
      </md-input-container>
      </p>
      <p>{{name}}</p>
  </div>`,
})
export class AppComponent {
  title: string = 'Minimal Angular 2 setup with Webpack';
  name = null;
}
@benb7760
Copy link

benb7760 commented Feb 22, 2017

@rahulsethi-daffodilsw Can you check your doctype? #3196

@rahulsethi-daffodilsw
Copy link
Author

@benb7760 Thanks. Resolved. Thanks to @crisbeto for noticing.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
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

2 participants