简体   繁体   中英

Loading spinner before app rendered in vue.js

I'm working on vue.js app and I want to add a loading spinner before the app component rendered.. like what Instagram doing when opening the Instagram page it shows their logo before showing the page contents .. I tried a lot of solutions but not working well!

any idea ? thanks in advance :)

initially keep a state variable like showLoading : true

if(showLoading) {
      this.displayLoader();
       return;
 }
else {
    render (); //your main view

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM