oferh / ng2-completer

Angular 2 autocomplete component
http://oferh.github.io/ng2-completer/
MIT License
347 stars 172 forks source link

placeholder css #414

Closed AhmadKassem89 closed 5 years ago

AhmadKassem89 commented 6 years ago

Is there a way to style my placeholder ?

pflopez commented 5 years ago

You can override the class names provided (https://github.com/oferh/ng2-completer#css-classes) by doing something like this:

<ng2-completer class="my-component"[(ngModel)]="searchStr" [datasource]="dataService"></ng2-completer>
.my-component ::ng-deep {

  .completer-holder {
    // your overrides
  }
  .completer-input {
    // your overrides
  }
  .completer-dropdown-holder {
    // your overrides
  }

  /// .. etc
}

Its not the cleanest (not a fan of using ng-deep but works.