Creating a splash screen using ng-cloak

前端 未结 2 1326
夕颜
夕颜 2020-12-14 12:24

I\'m trying to create a splash screen using AngularJS as described in this talk on the AngularJS youtube channel: http://youtu.be/xOAG7Ab_Oz0?t=10m20s

It uses the ng

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 13:20

    This tutorial worked for me: http://www.ng-newsletter.com/advent2013/#!/day/21

    Here is a plunker: http://plnkr.co/edit/twGP7gUe9uraYXSr6kQG?p=preview

    Note some things:

    • In the demo I'm manually bootstrapping angular to simulate loading.
    • The splash screen markup should have ng-cloak attribute
    • The rest of the template should have ng-cloak attribute

    Markup:

    Loading

    app loaded

    Css:

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

提交回复
热议问题