nativescript-vue / nativescript-vue-navigator

A simple router for NativeScript-Vue, built on top of $navigateTo to simplify routing from within components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Activity Indicator before navigation

baermathias opened this issue · comments

It would be very useful to implement an activity indicator, which greyes out the background and shows an activity indication (e.g. inside a transparent modal). Then only after the single page component (which should be navigated to) was mounted, the navigation to this page and the transition animation should happen. Because else, if you have a lot of data to fetch inside your created hook the transition animation is completely messed up and also the navigation indication on the component, which should be navigated to is messed up.

Something like this:

this.$navigator.navigate('/overview', { beforeNavigationActivityIndicator: true })

It could be done by opening automatically a modal page with an activity indicator first and after the page you want navigate to was mounted sending an event to stop the activity indicator and continue with navigation + transition.

mounted() {
    this.$navigator.mounted()    // sends event to stop activity indicator on modal
}