Avoiding expressions being shown on page load

后端 未结 6 694
独厮守ぢ
独厮守ぢ 2020-12-15 05:00

In an AngularJS video at one point I saw how to avoid an expression being visible before the Javascript parses it. But I can\'t remember how it was done...

I have a

6条回答
  •  醉梦人生
    2020-12-15 05:40

    You can hide an expression with ngCloak, see this answer:

    Prevent double curly brace notation from displaying momentarily before angular.js compiles/interpolates document

    As for showing loading, you can just set $root.initializing.status to a default value of "Loading" and then reset it when you get your data.

提交回复
热议问题