亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

angular.js - ng-show will be displayed for a moment when the page is loaded. How to avoid it?
ringa_lee
ringa_lee 2017-05-15 17:11:36
0
9
841

The code is as follows. When the page is just loaded, the p where ng-show is located will pop up for a moment. How to avoid it?
<label class="col-sm-2 control-label">username</label>

            <p class="col-sm-10">
                <input type="text" autocomplete="off" name="username" ng-model="data.username" ng-minlength="5" ng-maxlength="10" ng-required="true" class="form-control"  placeholder="請(qǐng)輸入用戶名">
                <p ng-show="myform.username.$error.minlength" class="alert alert-danger help-block">
                    用戶名不能小于5位
                </p>
                <p ng-show="myform.username.$error.maxlength" class="alert alert-danger help-block">
                    用戶名不能大于10位
                </p>
            </p>
ringa_lee
ringa_lee

ringa_lee

reply all(9)
PHPzhong
  • Use ng-if to judge or

  • plus ng-cloak

曾經(jīng)蠟筆沒有小新

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

小葫蘆

Use ng-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