gpt4 book ai didi

angularjs - 这个 ng-message 不起作用的任何原因?

转载 作者:行者123 更新时间:2023-12-03 22:27:45 26 4
gpt4 key购买 nike

我有这段代码,我不确定我的 ng-massage dosent 弹出的方式......在我更改一些 css 和 html 之前它曾经工作..

之前:

<li>
<p flex style="margin-right: 14px;" class="wm-phone" >
<label >Phone:</label>
<input style=" width: 92%;"
name="phone_number"
ng-click="bookingPage.phone_number"
placeholder='edit'
onfocus="this.placeholder = ''"
ng-model="bookingPage.phone_number"
type="number"
ng-minlength="6"
class="wm-edit wm-phone-hide-spin-button"/>
</p>
<div ng-messages="BookingPageEditForm.phone_number.$error"
style="color:maroon;margin-left: 17px;">
<div ng-message="number">Not a valid number</div>
</div>
</li>

之后:

<li >
<div style="margin-right: 14px;" class="wm-phone" layout="row" layout-md="column" layout-sm="column">
<div ><label >Phone:</label></div>
<div > <input
name="phone_number"
ng-click="bookingPage.phone_number"
placeholder='edit'
onfocus="this.placeholder = ''"
ng-model="bookingPage.phone_number"
type="number"
ng-minlength="6"
class="wm-edit wm-phone-hide-spin-button"/></div>
</div>
<div ng-messages="BookingPageEditForm.phone_number.$error"
style="color:maroon;margin-left: 17px;">
<div ng-message="number">Not a valid number</div>
</div>
</li>

我试着把它改回来,但现在它们都不起作用了……欢迎任何帮助……

最佳答案

问题已解决,是我的失误,需要将其全部放在一个表单中,不小心将其删除。

<form method="post" 
name="BookingForm"
style="margin-bottom: 67px;"
ng-submit="settingSet()">
<li >
<div style="margin-right: 14px;" class="wm-phone" layout="row" layout-md="column" layout-sm="column">
<div ><label >Phone:</label></div>
<div > <input
name="phone_number"
ng-click="bookingPage.phone_number"
placeholder='edit'
onfocus="this.placeholder = ''"
ng-model="bookingPage.phone_number"
type="number"
ng-minlength="6"
class="wm-edit wm-phone-hide-spin-button"/></div>
</div>
<div ng-messages="BookingPageEditForm.phone_number.$error"
style="color:maroon;margin-left: 17px;">
<div ng-message="number">Not a valid number</div>
</div>
</li>

</form>

关于angularjs - 这个 ng-message 不起作用的任何原因?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31366395/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com