search

Home  >  Q&A  >  body text

angular.js - Angular loads slowly. Does the page display template tags?

When loading is very slow, {{xx}} will be displayed first. How to break it? ?

ringa_leeringa_lee2844 days ago1147

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-15 16:51:35

    When you need to use expressions to output data, don’t do this:

    <TAG>{{data}}</TAG>
    

    Instead this:

    <TAG ng-bind="data"></TAG>
    

    Or this:

    <TAG ng-cloak>{{data}}</TAG>
    

    In addition, this method requires you to manually load the angular-csp.css file into the page.

    reply
    0
  • 怪我咯

    怪我咯2017-05-15 16:51:35

    http://www.imooc.com/view/156
    There was a lesson about it, and I just started watching it.

    reply
    0
  • Cancelreply