(Angular-ui-router) Show loading animation during resolve process

后端 未结 11 849
生来不讨喜
生来不讨喜 2020-12-07 07:12

This is a two part question:

  1. I am using the resolve property inside $stateProvider.state() to grab certain server data before loading the controller. How wo

11条回答
  •  没有蜡笔的小新
    2020-12-07 08:16

    How about adding content to the div that will be filled by ui-router once the properties have resolved?

    In your index.html

    Loading....

    The user will now see "Loading..." while the properties are resolved. Once everything is ready the content will be replace by ui-router with your apps content.

提交回复
热议问题