angular.js - 页面加载的时候ng-show会显示出来一瞬间,怎么避免
ringa_lee
ringa_lee 2017-05-15 17:11:36
0
9
670

代码如下,页面刚加载的时候ng-show所在的p会冒出来一瞬间,怎么避免呢?

用户名不能小于5位

用户名不能大于10位

ringa_lee
ringa_lee

ringa_lee

reply all (9)
PHPzhong
  • Useng-ifto judge or

  • plusng-cloak

    曾经蜡笔没有小新

    ng-show, ng-hide are css display and hiding. Try changing the duration of this animation effect to the minimum

      小葫芦

      Is this form validation? I think it’s better if you try using ng-if

        我想大声告诉你

        Add ng-cloak to element

          Ty80

          ng-cloak

            小葫芦

            Use ng-if, show just simply changes the display: none; ng-if removes the entire DOM, so there won’t be the situation you mentioned

              小葫芦

              Useng-if

                Peter_Zhu

                Add the ng-hide class during initialization or set display: none, and it will be hidden by default

                  刘奇

                  http://www.cnblogs.com/whitew...

                    Latest Downloads
                    More>
                    Web Effects
                    Website Source Code
                    Website Materials
                    Front End Template
                    About us Disclaimer Sitemap
                    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!