Uncaught (in promise): Error: No value accessor for form control with unspecified name attribute


#1

While navigate from one page(search page) to next page(results page), In console its throwing the following error.

JS: ERROR Error: Uncaught (in promise): Error: No value accessor for form control with unspecified name attri
bute
JS: Error: No value accessor for form control with unspecified name attribute
JS:     at _throwError (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/forms/bund
les/forms.umd.js:1836:11) [angular]
JS:     at setUpControl (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/forms/bun
dles/forms.umd.js:1746:9) [angular]
JS:     at NgModel._setUpStandalone (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angul
ar/forms/bundles/forms.umd.js:4311:9) [angular]
JS:     at NgModel._setUpControl (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/
forms/bundles/forms.umd.js:4297:37) [angular]
JS:     at NgModel.ngOnChanges (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/fo
rms/bundles/forms.umd.js:4228:18) [angular]
JS:     at checkAndUpdateDirectiveInline (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@
angular/core/bundles/core.umd.js:10819:19) [angular]
JS:     at checkAndUpdateNodeInline (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angul
ar/core/bundles/core.umd.js:12245:17) [angular]
JS:     at checkAndUpdateNode (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/cor
e/bundles/core.umd.js:12184:16) [angular]
JS:     at debugCheckAndUpdateNode (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angula
r/core/bundles/core.umd.js:12887:59) [angular]
JS:     at debugCheckDirectivesFn (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular
/core/bundles/core.umd.js:12828:13) [angular]
JS:     at Object.eval [as updateDirectives] (ng:///AppModule/Ismvesseldetails.ngfactory.js:6721:5) [angular]
JS:     at Object.debugUpdateDirectives [as updateDirectives] (file:///data/data/org.nativescript.IFS/fi
les/app/tns_modules/@angular/core/bundles/core.umd.js:12813:21) [angular]
JS:     at checkAndUpdateView (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/cor
e/bundles/core.umd.js:12151:14) [angular]
JS:     at callViewAction (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/core/bu
ndles/core.umd.js:12514:21) [angular]
------------------------------------------------------
JS: Selected index changed! New inxed: 0
JS: Selected index changed! New inxed: 0
JS: tabLoaded
JS: tabLoaded

My search page is simple component. And results page having two TabViews with 7tabs & 3tabs simultaneously.
Each and every time its showing the above error and loaded the tabs inside search result component.
Why this error occured?

goBack event Error -
If i tried to goBack to search component from search results component then its navigated to search component and there itself app stucked, entire app navigations are not working. That time “Current componentRef is different for cached componentRef” error occurred,

JS: ERROR Error: Uncaught (in promise): Error: Current componentRef is different for cached componentRef
JS: Error: Current componentRef is different for cached componentRef
JS:     at PageRouterOutlet.deactivate (file:///data/data/org.nativescript.IFS/files/app/tns_modules/nat
ivescript-angular/router/page-router-outlet.js:106:23) [angular]
JS:     at ActivateRoutes.deactiveRouteAndOutlet (file:///data/data/org.nativescript.IFS/files/app/tns_m
odules/@angular/router/bundles/router.umd.js:4578:20) [angular]
JS:     at ActivateRoutes.deactiveRouteAndItsChildren (file:///data/data/org.nativescript.IFS/files/app/
tns_modules/@angular/router/bundles/router.umd.js:4538:18) [angular]
JS:     at ActivateRoutes.deactivateRoutes (file:///data/data/org.nativescript.IFS/files/app/tns_modules
/@angular/router/bundles/router.umd.js:4467:22) [angular]
JS:     at file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/router/bundles/router.u
md.js:4429:19 [angular]
JS:     at Array.forEach (native) [angular]
JS:     at ActivateRoutes.deactivateChildRoutes (file:///data/data/org.nativescript.IFS/files/app/tns_mo
dules/@angular/router/bundles/router.umd.js:4428:29) [angular]
JS:     at ActivateRoutes.activate (file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angula
r/router/bundles/router.umd.js:4415:14) [angular]
JS:     at file:///data/data/org.nativescript.IFS/files/app/tns_modules/@angular/router/bundles/router.u
md.js:4034:22 [angular]
JS:     at SafeSubscriber._next (file:///data/data/org.nativescript.IFS/files/app/tns_modules/rxjs/Obser
vable.js:110:21) [angular]
JS:     at SafeSubscriber.__tryOrSetError (file:///data/data/org.nativescript.IFS/files/app/tns_modules/
rxjs/Subscriber.js:247:16) [angular]
JS:     at SafeSubscriber.next (file:///data/data/org.nativescript.IFS/files/app/tns_modules/rxjs/Subscr
iber.js:187:27) [angular]
JS:     at Subscriber._next (file:///data/data/org.nativescript.IFS/files/app/tns_modules/rxjs/Subscribe
r.js:125:26) [angular]
JS:     at Subscriber.next (file:///data/data/org.nativescript.IFS/files/app/tns_modules/rxjs/Subscriber
.js:89:18) [angular]

My codes are,

**searchresults.html**
<ActionBar title="IFS" android.icon="res://logo" android.iconVisibility="always">
<ActionItem icon="res://ic_arrow_back_white_48dp" (tap)="goBack()" >
  </ActionItem>
  </ActionBar>
<StackLayout class="page-common">

**searchresults.ts**

public goBack() {
 this.routerExtensions.backToPreviousPage();
}

Please suggest!

Current working environment -

Nativescript version - 3.0.3
TypeScript - 2.3.2
IDE - Visual Studio Code with nativescript-cli 0.0.3
Node.js version - v6.10.2

Thank you for reading, looking forward to reading your responses!