4

enter image description hereAfter install ng-select with :

npm install --save @ng-select/ng-select

I'm importing the material style to styles.scss with :

@import "~@ng-select/ng-select/themes/material.theme.css";

body {

But after all, the component is being presented with a very strange appearance.

Lookin at node_modules folder I can't see the ng-select folder to look at it's themes folder.

Any ideas please ?

4
  • remove node modules and reinstall everything Commented Oct 16, 2018 at 1:05
  • Did it but with no results. The font is something like courier and the component caption is too small. Commented Oct 16, 2018 at 1:13
  • @GCoe Can you show your view code? That looks like a multi-select box. Commented Oct 16, 2018 at 1:23
  • Shure @AvinKavish : <ng-select [(ngModel)]="talhoesSelecionados" (change)="resetarRegistrosDeProducaoSelecionados()" [items]="talhoes" [multiple]="true" [closeOnSelect]="false" bindLabel="DescricaoDoTalhao" bindValue="CodigoDoTalhao" placeholder="Selecione o talhão" [(ngModel)]="talhoesSelecionados"> </ng-select> Commented Oct 16, 2018 at 1:29

2 Answers 2

11

Solved with :

@import "~@ng-select/ng-select/themes/material.theme.css"; at styles.css 

and

style="font-family: roboto" at the ng-select tag
Sign up to request clarification or add additional context in comments.

1 Comment

Is it like this: ng-select {style = "font-family: roboto"}
3

In Angular 13 Add this code in your angular.json styles block :

       "styles": [
         ....
         ....
          "node_modules/@ng-select/ng-select/themes/default.theme.css",
        ],

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.