下面的代码显示了我如何调用submit函数,但是在单击按钮后弹出窗口将不会关闭。
<input style="margin-left: 12px"
type="submit"
ng-disabled="myForm.schl.$dirty && myForm.schl.$invalid || myForm.fname.$dirty && myForm.fname.$invalid ||myForm.email.$dirty && myForm.email.$invalid||myForm.email.$dirty && myForm.email.$invalid "
class="eduKab_invite btn btn-info"
value="INVITE SCHOOL ADMIN"
ng-click="SaveSchool()">
我的HTML代码是 加入学校 学校名称&lt; / label&gt; - &gt; ⚠ ⚠ ✔ 地址&LT; /标签&gt; - &GT; - &GT; ⚠&LT; /跨度&GT; - &GT; - &GT; ✔&LT; /跨度&GT; - &GT; - &GT; ⚠&LT; /跨度&GT; - &GT; - &GT; ✔&LT; /跨度&GT; - &GT; 邮编&LT; /标签&gt; - &GT; - &GT; ⚠&LT; /跨度&GT; - &GT; ⚠&LT; /跨度&GT; - &GT; - &GT; ✔&LT; /跨度&GT; - &GT; - &GT; ⚠&LT; /跨度&GT; - &GT; ⚠&LT; /跨度&GT; - &GT; - &GT; ✔&LT; /跨度&GT; - &GT; 市&LT; /标签&gt; - &GT; - &GT; ⚠&LT; /跨度&GT; - &GT; ⚠&LT; /跨度&GT; - &GT; - &GT; ✔&LT; /跨度&GT; - &GT;
<input type="text" class="eduKab_input1" id="fname" name="fname" ng-model="fname" maxlength="100" placeholder="First Name"required="true" ng-pattern="/^[a-zA-Z\s]*$/"/>
<span style="color: red" ng-show="myForm.fname.$dirty && myForm.fname.$invalid ">
<span title="Please enter your First name " style="margin-left: -12px" class="eduKab_spanred" ng-show="myForm.fname.$error.required">⚠</span>
<span class="eduKab_spanred" ng-show="myForm.fname.$error.pattern">⚠</span>
</span>
<span style="margin-left: -12px" class="eduKab_spangreen" ng-show="myForm.fname.$valid">✔</span>
</div>
<div class="col-md-6 padding-top-10">
<input type="text" class="eduKab_input1" id="lname" name="lname" ng-model="lname" maxlength="100" placeholder="Last Name"required="true" ng-pattern="/^[a-zA-Z\s]*$/"/>
<span style="color: red" ng-show="myForm.lname.$dirty && myForm.lname.$invalid">
<span title="Please enter your Last Name" style="margin-left: -12px"class="eduKab_spanred" ng-show="myForm.lname.$error.required" >⚠</span>
<span style="margin-left: -12px" class="eduKab_spanred" ng-show="myForm.lname.$error.pattern">⚠</span>
</span>
<span style="margin-left: -12px "class="eduKab_spangreen" ng-show="myForm.lname.$valid">✔</span>
</div>
</div>
<div style="margin-left: 1%" class="row padding-top-10">
<div id="addschl" class="col-md-12 padding-top-10">
<input type="email" class="eduKab_schlin" id="email" name="email" maxlength="50" ng-model="email" placeholder="Email Id" required="true" ng-pattern="/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/" />
<span style="margin-left: -20px" title="Please enter Valid EmauiId or fields are empty" class="eduKab_spanred" ng-show="myForm.email.$dirty && myForm.email.$invalid">⚠</span>
<!--<span ng-show="myForm.email.$error.required">Email is required.</span>-->
<!--<span ng-show="myForm.email.$error.email">Invalid email address.</span>-->
<span class="eduKab_spangreen" ng-show="myForm.email.$valid">✔</span>
</div>
<div class="col-md-12 padding-top-10">
<input type="text" class="eduKab_schlin" id="num" name="num" ng-model="num" minlength="10" placeholder="Contact Number" maxlength="10" required="true" ng-pattern="/^(\d)+$/"/>
<!--<span style="color:red" ng-show="myForm.num.$dirty && myForm.num.$invalid">-->
<!--<span title="Please enter your Valid Contact number" style="margin-left: -25px" class="eduKab_spanred" ng-show="myForm.num.$error.pattern"> ⚠</span>-->
<!--<span style="margin-left: -20px"class="eduKab_spanred" ng-show="myForm.num.$error.required"> ⚠</span>-->
<!--<span ng-show="myForm.num.$error.num"></span>-->
<!--</span>-->
<!--<span class="eduKab_spangreen" ng-show="myForm.num.$valid">✔</span>-->
</div>
</div>
<div class="row padding-top-10">
<div class="col-md-2 padding-top-10">
</div>
<div id="addschl" class="col-md-8 padding-top-10">
<input style="margin-left: 12px" type="submit" ng-disabled =" !myForm.$dirty || myForm.school.$dirty && myForm.school.$invalid || myForm.fname.$dirty && myForm.fname.$invalid || myForm.lname.$dirty && myForm.lname.$invalid || myForm.email.$dirty && myForm.email.$invalid" class="eduKab_invite btn btn-info" value="INVITE SCHOOL ADMIN" ng-click="SaveSchool()">
</div>
<div class="col-md-2 padding-top-10">
</div>
</div>
</form>
</div>
</script>