nativescript-autocomplete icon indicating copy to clipboard operation
nativescript-autocomplete copied to clipboard

nativescript-autocomplete not working in Router

Open madhanagopalgit opened this issue 8 years ago • 1 comments
trafficstars

Hi, I am new to Nativescript Angular 2 I am using this plugin in my Nativescript+Angular android app project. It is working excellent on first page but when i navigate to another page it throwing an silent error saying setAdapter of undefied.

My code is: app.module.ts import { registerElement } from "nativescript-angular/element-registry"; registerElement("AutoComplete", () => require("nativescript-autocomplete").AutoComplete);

app.component.html <AutoComplete [items]="genders" (itemTap)="onItemTap($event)"></AutoComplete>

app.component.ts genders: Array = ['Male','Female','Other']; onItemTap(args){ console.log(args.data); }

It is working fine in app.component.html

I have another html named register.html. I am using the same code and i am navigating to this html using router page-router-outlet this.router.navigate['/register']

in register page it throwing error Cannot read property 'setAdapter' of undefined on itemsUpdate

Please guide me how to resolve this issue

madhanagopalgit avatar Mar 16 '17 06:03 madhanagopalgit

I also have same issue... Please any one guide us to resolve this issue. I need urgently...please... thanxx

ghost avatar Mar 22 '17 06:03 ghost