hardy12994 / ng4-auto-complete Goto Github PK
View Code? Open in Web Editor NEWUsing Input Tag and on type the list refresh, with Features - show list length, taking String/Object list, list trigger on word count, takes string and gives string
Using Input Tag and on type the list refresh, with Features - show list length, taking String/Object list, list trigger on word count, takes string and gives string
Shows above message for dynamically created input texts with dynamic id attribute value
HTML SETUP
<input id="list" [ng4-auto-complete]="users" [word-trigger]="2" [list-length]="10" filterName="username"
no-record-text="No Records Found!" type="text" class="form-control" placeholder="Pesquisar por usuário"
(keyup.enter)="addUser()" [(ngModel)]="userEmail" />
ANGULAR SETUP
private setList(users) {
this.AutoCompleteService.setDynamicList(users);
}
private getUsers() {
this.UserService.getUsers().subscribe(
(res: any) => {
this.users = res;
this.setList(this.users);
},
(err: any) => {
console.log(err);
}
);
}
this method getUsers returns me a HUGE list of users so its not empty, and the filterName is set to username witch is a field of the array, so i dont know why its not working at all,
I've set up the modules and the .ts correctly
EDIT: using node 8.10 and angular 4.4.6
ngOnInit() { this.test() }
test() { let test = this.http.get('http://localhost:8080/v1/places/all') .subscribe((res: Response) => { this.places = res.json() }); }
<input class="form-control" placeholder="Bestemming" id="place" name="place" [ng4-auto-complete]="places" no-record-text="Geen resultaat gevonden">
Output:
static list found empty
{{ places }}
works, [ng4-auto-complete]="places"
doesn't.
I'm lost for words, and I've been stuck on this problem for over two hours and I can't figure it out.
The data I'm trying to use AutoComplete on:
[ "Gouda", "Bodengraven", "Amsterdam" ]
core.js:1427 ERROR TypeError: $(...).autocomplete is not a function
at AutoCompleteDirective.initDropdown (auto.directive.js:237)
at AutoCompleteDirective.removeOldList (auto.directive.js:339)
at SafeSubscriber.eval [as _next] (auto.directive.js:305)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:238)
at SafeSubscriber.next (Subscriber.js:185)
at Subscriber._next (Subscriber.js:125)
at Subscriber.next (Subscriber.js:89)
at HTMLInputElement.handler (FromEventObservable.js:210)
at ZoneDelegate.invokeTask (zone.js:425)
at Object.onInvokeTask (core.js:4744)
$(...).autocomplete is not a function
initDropdown auto.directive.js:237
configureDirective auto.directive.js:128
ngOnInit auto.directive.js:22
Angular 5
View_ListingComponent_0 ListingComponent.html:186
Angular 24
RxJS 5
Angular 8
Got this error when I am tryng to use.
I also added
Can you please check why its been not loading
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.