在单击提交按钮后的模态弹出窗口中弹出窗口不会在angularjs

时间:2015-12-30 11:20:13

标签: javascript html angularjs

下面的代码显示了我如何调用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">&#9888;</span>
                         <span  class="eduKab_spanred"  ng-show="myForm.fname.$error.pattern">&#9888;</span>
                    </span>
                    <span style="margin-left: -12px" class="eduKab_spangreen" ng-show="myForm.fname.$valid">&#10004;</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" >&#9888;</span>
                        <span  style="margin-left: -12px" class="eduKab_spanred" ng-show="myForm.lname.$error.pattern">&#9888;</span>
                    </span>
                    <span style="margin-left: -12px "class="eduKab_spangreen" ng-show="myForm.lname.$valid">&#10004;</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">&#9888;</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">&#10004;</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"> &#9888;</span>-->
                        <!--<span style="margin-left: -20px"class="eduKab_spanred" ng-show="myForm.num.$error.required"> &#9888;</span>-->
                        <!--<span ng-show="myForm.num.$error.num"></span>-->
                        <!--</span>-->
                    <!--<span  class="eduKab_spangreen" ng-show="myForm.num.$valid">&#10004;</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>

0 个答案:

没有答案