Opposite of ng-cloak for loading message

后端 未结 3 1620
刺人心
刺人心 2021-02-05 01:33

I don\'t know if this exists in the AngularJS framework, but essentially I\'m looking for the opposite of ng-cloak, which hides elements until the page is compiled. I was looki

3条回答
  •  被撕碎了的回忆
    2021-02-05 02:35

    You can use css to archive this behavior.

    Create a class:

    .splash {
      display: none;
    }
    
    [ng-cloak].splash {
      display: block !important;
    }
    

    And then add:

    Loading...

    This will show before the Angular code loads, and will hide after the angular code completes. Don't forget to wrap your angular code with ng-cloak too.

    Your code...

提交回复
热议问题