Nuxt.js: Show default Progress Bar when loading data

Created on 23 Nov 2017  路  3Comments  路  Source: nuxt/nuxt.js

Is there any best practise to display the lovely Progress bar which comes with nuxt, at any time from a component or from a mutation in the store (for example: showing the progress of data being loaded or a form being submitted)?

I tried it with calling this.$nuxt.$loading.start() which does not work all the time (at some points $nuxt was undefined).

Big thanks in advance!

This question is available on Nuxt.js community (#c1946)
help-wanted

Most helpful comment

Hi. Yes it is a good idea using a unified loading indicator everywhere IMO. As loading is for client side, we can use $nuxt.$loading.start() (window.$nuxt) which should be always available.

All 3 comments

Hi. Yes it is a good idea using a unified loading indicator everywhere IMO. As loading is for client side, we can use $nuxt.$loading.start() (window.$nuxt) which should be always available.

@pi0 Great, thanks! Yes as long as it is on client-side this solution should be fine :-)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikekidder picture mikekidder  路  3Comments

vadimsg picture vadimsg  路  3Comments

maicong picture maicong  路  3Comments

surmon-china picture surmon-china  路  3Comments

VincentLoy picture VincentLoy  路  3Comments