Error: Current componentRef is different for cached componentRef


#1

CLI: 3.0.2
Cross-platform modules: 3.0.1
Runtime(s):3.0.1
Plugin(s): -

Hello again,

because of this error I decided to implement the first modal page as a page:

    { path: "announcements", component: AnnouncementsComponent },
    { path: "announcements/announcement/:id", component: AnnouncementComponent },

So, I have a listing with announcements, and if you tap on one a new page is loaded with the close up announcement.
Ypu can then go back with the back link on the action bar.

Everything works fine, but if I go back to the listing again and I want to tap on another announcement the following error occurs:

CONSOLE ERROR file:///app/tns_modules/@angular/core/./bundles/core.umd.js:1091:24: ERROR Error: Uncaught (in promise): Error: Current componentRef is different for cached componentRef
	deactivate@file:///app/tns_modules/nativescript-angular/router/page-router-outlet.js:105:32 [angular]
	deactiveRouteAndOutlet@file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4578:30 [angular]
	deactiveRouteAndItsChildren@file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4538:40 [angular]
	deactivateRoutes@file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4467:49 [angular]
	file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4429:35 [angular]
	forEach@[native code] [angular]
	deactivateChildRoutes@file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4428:36 [angular]
	activate@file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4415:35 [angular]
	file:///app/tns_modules/@angular/router/./bundles/router.umd.js:4034:30 [angular]
	file:///app/tns_modules/rxjs/Observable.js:110:25 [angular]
	__tryOrSetError@file:///app/tns_modules/rxjs/Subscriber.js:247:20 [angular]
	next@file:///app/tns_modules/rxjs/Subscriber.js:187:42 [angular]
	_next@file:///app/tns_modules/rxjs/Subscriber.js:125:30 [angular]
	next@file:///app/tns_modules/rxjs/Subscriber.js:89:23 [angular]
	_next@file:///app/tns_modules/rxjs/operator/map.js:83:30 [angular]
	next@file:///app/tns_modules/rxjs/Subscriber.js:89:23 [angular]
	notifyNext@file:///app/tns_modules/rxjs/operator/mergeMap.js:143:34 [angular]
	_next@file:///app/tns_modules/rxjs/InnerSubscriber.js:23:31 [angular]
	next@file:///app/tns_modules/rxjs/Subscriber.js:89:23 [angular]
	_next@file:///app/tns_modules/rxjs/operator/map.js:83:30 [angular]
	next@file:///app/tns_modules/rxjs/Subscriber.js:89:23 [angular]
	_subscribe@file:///app/tns_modules/rxjs/observable/ScalarObservable.js:49:28 [angular]
	_trySubscribe@file:///app/tns_modules/rxjs/Observable.js:57:35 [angular]
	subscribe@file:///app/tns_modules/rxjs/Observable.js:45:40 [angular]

Can anybody help me here?


#3

I’'m also stuck on the same issue. Any ideas how to fix this?


#4

I am stuck at same issues, can anyone help ? I tried all options provided by angularjs2 :thinking:


#5

Any fix/solution avail on this?