Questions tagged angular-ngselect

Explore the latest questions and answers asked by our top developers.

populate ng-select with json data

I’m trying to populate a ng-select here i leave the repo link of the package, i’m using angular 12 cli. When i create a new register, this populate correctly and print in the form the options and the multiple select works fine. but when i’m trying to edit the user registered I can’t print the […]

By gutiec
Published
Categorized as angular, angular-ngselect, javascript Tagged , ,

searchInput in ngSelect can not auto focus

I want trigger my searchInput in ngSelect auto focus but it doesn’t work. Below is my code. File template <span #addTopic class="w-100 d-block text-truncate" (click)="openDropdownTopic()">Add Topic</span> <ng-select #dropdownTopic [items]="topics" [addTag]="true" class="ng-select ng-select-sm" bindLabel="name" bindValue="name" formControlName="name" addTagText="Add topic" > </ng-select> File typescript @ViewChild(‘addTopic’) addTopic: ElementRef; @ViewChild(‘dropdownTopic’) dropdownTopic: NgSelectComponent; openDropdownTopic() { this.dropdownTopic.open(); this.dropdownTopic.searchInput.nativeElement.autofocus = true; } Details: […]

By Matt
Published
Categorized as angular, angular-ngselect, html, typescript Tagged , , ,

Getting error while adding new package after updating Angular 11 to 13

I am trying to install new package. npm install –save @ng-select/ng-select after updating my Angular application from 11 to 13. Image of CMD while installing ng-select package Source: Angular Questions

By Ammad Naeem
Published
Categorized as angular, angular-ngselect, angular13 Tagged , ,

Can we provide conditionally ‘bindValue’ in ng-select?

<ng-select [items]="selectdata" bindLabel="name" bindValue="bindValue?bindValue:”" [multiple]="selectMultiple" [placeholder]="placeholder" [(ngModel)]="inputModel" [ngModelOptions]="{ standalone: true }" [formControl]="formGroup" [clearable]="clearable" [searchable]="searchable" This is the child component. <app-csselect #csselectcomponent [inputDesign]="’ngselect’" [selectdata]="selectdata" [inputLabel]="’This is label’" [(inputModel)]="selectbox" [selectMultiple]="true" [searchable]="true" formControlName="selectbox" ></app-csselect> this is parent component, where I am trying to access the child object. now I want to bind the value because I have requirement […]

By yesha bhatt
Published
Categorized as angular, angular-ngselect Tagged ,

Install Angular NgSelect module

I was following this tutorial to install Ngselect module in an Angular app and got this error while serving app. I googled and couldn’t find what is wrong here. ERROR in Unexpected value ‘NgSelectModule in D:/ku-site/ku-web/node_modules/@ng-select/ng-select/lib/ng-select.module.d.ts’ imported by the module ‘AppModule in D:/ku-site/ku-web/ku-web/src/app/app.module.ts’. Please add a @NgModule annotation. app.module.ts import { BrowserModule, HAMMER_GESTURE_CONFIG } from […]

By Shyam3089
Published
Categorized as angular, angular-ngselect, select, typescript Tagged , , ,

Angular Ng-Select only selects one option when two of the same are given

I am relatively new to angular. I am currently working on my first project and got to know ng-select. Great modification but now I have a problem: I have an array of objects as options from which are a few pre-selected. These objects all differ in at least one aspect which is the ID. The […]

By Rood
Published
Categorized as angular, angular-ngselect, option, select Tagged , , ,

using Rating in ng select angular

I tried to use p-rating in ng select but when I want to click on Rating the ng select is clicked if I want to just click on Rating but ng select is clicked My problem is that I want to click Rating but after click my dropdown clicked instead of rating my html code […]

By saeed Taghizade
Published
Categorized as angular, angular-ngselect, primeng Tagged , ,

Angular(11.2.14) ng-select2 error during ng-serve

facing this error while trying ng-serve in a freshly cloned repo works fine in my previous device (new device , coworker suspect M1 apple silicon is what caused this error) full error log https://pastebin.com/va40cDXs Error: node_modules/ng-select2/lib/ng-select2.component.d.ts:35:21 – error TS2694: Namespace ‘"/Users/name/Documents/Angular/project/project_fe/project-fe/node_modules/@angular/core/core"’ has no exported member ‘ɵɵFactoryDeclaration’. 35 static ɵfac: i0.ɵɵFactoryDeclaration<NgSelect2Component, never>; ~~~~~~~~~~~~~~~~~~~~ Error: node_modules/ng-select2/lib/ng-select2.component.d.ts:36:21 – […]

By Ivan
Published
Categorized as angular, angular-ngselect, npm, npm-install Tagged , , ,

How to reset ng-select upon selecting another ng-select dropdown in angular?

I have 3 ng-selects like below in code, how can I reset other selections upon selecting any one. Like if i select selectOne, then selectTwo and selectThree should be reset. I’m using ng-select library. <ng-select id="selectOne" formControlName="name1" (change)="someFun()"> <ng-option *ngFor = "let x of y" [value]="somevalue">{{somevalue}}</ng-option> </ng-select> <ng-select id="selectTwo" formControlName="name2" (change)="someFun()"> <ng-option *ngFor = "let […]

By Invincible me
Published
Categorized as angular, angular-ngselect, typescript Tagged , ,

updating to angular 10 throws errors related to ng-select

i have problems when updating angular app from version 9 to version 10. enter image description here In the image, you can see that there is an incompatible dependency. I know there are many questions asked around this but i was unable to solve the problem.enter image description here Also there is my package.json. I […]

By Guido
Published
Categorized as angular, angular-ngselect Tagged ,
1 2 3 12

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq