1

I know that I can do this:

::-ms-input-placeholder,  /* Microsoft Edge */
:-ms-input-placeholder,   /* Internet Explorer 10-11 */
::placeholder  /* Chrome, Firefox, Opera, Safari 10.1+ */
{
  text-indent: 10px;
}

but I want to do this with the biding property [style...]

<input type="text" [style.placeholder.text-indent.px]="customIndent">
Jorge C
  • 63
  • 7
  • I honestly don't think that's possible. You'd have to target it using CSS. – Jake Apr 04 '19 at 11:16
  • Possible duplicate of [Change style of pseudo elements in angular2](https://stackoverflow.com/questions/35280118/change-style-of-pseudo-elements-in-angular2) – Harun Yilmaz Apr 04 '19 at 11:24

1 Answers1

0

I'm not sure I understand your problem but :

You can try this


    number = 10;

    getStyle() {
         style = {
           'text-indent:' : this.number + 'px'
          } 
         return style;     
    }

and use like :

<input type="text" [ngStyle]="getStyle()">