Add placeholder to select tag in angular2

后端 未结 15 1599
眼角桃花
眼角桃花 2021-01-03 19:54

I have simple component that contains only form:

import {Component, FORM_DIRECTIVES, NgFor} from \'angular2/angular2\';


@Component({
  selector: \'test-com         


        
15条回答
  •  [愿得一人]
    2021-01-03 20:33

    I got this to work by doing the following:

    enter code here
    
    

    then using css ng-pristine for styling

    select {
     border: 1px solid transparent;
      &.ng-pristine{
        font-style: italic;
        color: darken($white, 50%);
      }
    }
    

提交回复
热议问题