nativescript-vue-navigator icon indicating copy to clipboard operation
nativescript-vue-navigator copied to clipboard

$navigateTo() frame ID issue

Open unremarkablegarden opened this issue 5 years ago • 1 comments

To use this.$navigateTo() you now have to specify the frame ID 'navigator' explicitly or it won't navigate. Also won't give an error unless you add a catch().

This after running some of the later updates to the nativescript vue packages. Not sure which version I was at before when it was still working, sorry. Currently on the latest.

this.$navigateTo(ItemDetails, {
    frame: 'navigator',
    props: { ... }
}).catch(error => console.log(error))

The error I caught was: TypeError: undefined is not an object (evaluating 'frame.id')

unremarkablegarden avatar Aug 06 '20 07:08 unremarkablegarden

That's correct - you shouldn't need to use $navigateTo with the navigator, the call should be

this.$navigator.navigate('/path/of/the/details/route', {
    props: { ... }
}).catch(error => console.log(error))

rigor789 avatar Aug 06 '20 11:08 rigor789