/ / त्रुटि: कैश्ड कंपोनेंट के लिए करंट कंपोनेंट रीफ अलग होता है

त्रुटि: कैश घटक घटक के लिए वर्तमान घटक आरएफ अलग है - कोणीय, कोणीय 2-मूलभूत

मैं एक NativeScript Angular 2 एप्लिकेशन विकसित कर रहा हूं।

मेरे पास एक सूची दृश्य है जिसमें एक गुच्छा हैवस्तुओं। इनमें से किसी एक वस्तु के दोहन से एक नया घटक खुल जाता है। सूची में वापस जाने के लिए और सूची में किसी अन्य ऑब्जेक्ट पर प्रेस करने के लिए बैक बटन दबाने के बाद, मुझे निम्नलिखित त्रुटि मिलती है:

मैं इसे कैसे ठीक करूं?

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]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
_innerSub@file:///app/tns_modules/rxjs/operator/mergeMap.js:130:55 [angular]
_tryNext@file:///app/tns_modules/rxjs/operator/mergeMap.js:127:23 [angular]
_next@file:///app/tns_modules/rxjs/operator/mergeMap.js:110:26 [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]
_complete@file:///app/tns_modules/rxjs/operator/reduce.js:119:34 [angular]
complete@file:///app/tns_modules/rxjs/Subscriber.js:114:27 [angular]
_complete@file:///app/tns_modules/rxjs/operator/mergeMap.js:135:38 [angular]
complete@file:///app/tns_modules/rxjs/Subscriber.js:114:27 [angular]
_subscribe@file:///app/tns_modules/rxjs/observable/ArrayObservable.js:116:32 [angular]
_trySubscribe@file:///app/tns_modules/rxjs/Observable.js:57:35 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:45:40 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
_innerSub@file:///app/tns_modules/rxjs/operator/mergeMap.js:130:55 [angular]
_tryNext@file:///app/tns_modules/rxjs/operator/mergeMap.js:127:23 [angular]
_next@file:///app/tns_modules/rxjs/operator/mergeMap.js:110:26 [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]
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]
notifyComplete@file:///app/tns_modules/rxjs/operator/every.js:53:30 [angular]
_complete@file:///app/tns_modules/rxjs/operator/every.js:70:28 [angular]
complete@file:///app/tns_modules/rxjs/Subscriber.js:114:27 [angular]
_complete@file:///app/tns_modules/rxjs/operator/mergeMap.js:135:38 [angular]
complete@file:///app/tns_modules/rxjs/Subscriber.js:114:27 [angular]
_subscribe@file:///app/tns_modules/rxjs/observable/ArrayObservable.js:116:32 [angular]
_trySubscribe@file:///app/tns_modules/rxjs/Observable.js:57:35 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:45:40 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
_innerSub@file:///app/tns_modules/rxjs/operator/mergeMap.js:130:55 [angular]
_tryNext@file:///app/tns_modules/rxjs/operator/mergeMap.js:127:23 [angular]
_next@file:///app/tns_modules/rxjs/operator/mergeMap.js:110:26 [angular]
next@file:///app/tns_modules/rxjs/Subscriber.js:89:23 [angular]
notifyComplete@file:///app/tns_modules/rxjs/operator/every.js:53:30 [angular]
_complete@file:///app/tns_modules/rxjs/operator/every.js:70:28 [angular]
complete@file:///app/tns_modules/rxjs/Subscriber.js:114:27 [angular]
_complete@file:///app/tns_modules/rxjs/operator/mergeMap.js:135:38 [angular]
complete@file:///app/tns_modules/rxjs/Subscriber.js:114:27 [angular]
_subscribe@file:///app/tns_modules/rxjs/observable/ArrayObservable.js:116:32 [angular]
_trySubscribe@file:///app/tns_modules/rxjs/Observable.js:57:35 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:45:40 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
_innerSub@file:///app/tns_modules/rxjs/operator/mergeMap.js:130:55 [angular]
_tryNext@file:///app/tns_modules/rxjs/operator/mergeMap.js:127:23 [angular]
_next@file:///app/tns_modules/rxjs/operator/mergeMap.js:110:26 [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]
subscribe@file:///app/tns_modules/rxjs/Observable.js:42:26 [angular]
_innerSub@file:///app/tns_modules/rxjs/operator/mergeMap.js:130:55 [angular]
_tryNext@file:///app/tns_modules/rxjs/operator/mergeMap.js:127:23 [angular]
_next@file:///app/tns_modules/rxjs/operator/mergeMap.js:110:26 [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]

`` `

उत्तर:

जवाब के लिए 2 № 1

मेरे पास यह त्रुटि थी क्योंकि विवरण पृष्ठ एक्शनबार में एक ऑब्जेक्ट प्रॉपर्टी का उल्लेख कर रहा था ... (ऐसा लगता है कि जब कार्रवाई बार प्रदान की गई थी, तो यह तत्काल नहीं किया गया)


जवाब के लिए 0 № 2

मैंने अपनी विशेषता में सिर्फ एक * ngIf जोड़ा है ताकि यह सत्यापित किया जा सके कि यह अपरिभाषित नहीं है।

उदाहरण:

<StackLayout *ngIf="example">
<Label textWrap="true" [text]="example.title"></Label>
<Image [src]="example.image" height="100"></Image>
</StackLayout>