angularjs - Angular and not angular forms within the same page -
i have 2 forms on single page. 1 form adding/deleting working fine. in second form (which don't want through angular)
but not able submit this(second form). both forms inside app. have idea please share.
i can see when refresh page "ng-pristine ng-valid" classes added in second form.
this first form
<div class="address address-form" ng-hide="!isedit"> <form class="edit-address-form" ng-submit="updateaddress(currentaddress.aid);"> <div class="form-group"> <label class="sr-only" for="first_name">first name </label> <input type="text" class="form-control" id="first_name" value="testing" name="first_name" value="{{currentaddress.first_name}}" placeholder="first name" required ng-model="currentaddress.first_name"> </div> <div class="form-group"> <label class="sr-only" for="last_name">last name</label> <input type="text" class="form-control" id="last_name" name="last_name" placeholder="last name" ng-model="currentaddress.last_name" > </div> <div class="form-group"> <label class="sr-only" for="phone">phone/mobile</label> <input type="text" class="form-control" id="phone" name="phone" placeholder="phone" ng-model="currentaddress.phone"> </div> <div class="form-group"> <label class="sr-only" for="street">street address</label> <input type="text" class="form-control" id="street" name="street" placeholder="street address" ng-model="currentaddress.street"> </div> <div class="form-group"> <label class="sr-only" for="city">city</label> <input type="text" class="form-control" id="city" name="city" placeholder="city" ng-model="currentaddress.city" > </div> <div class="form-group"> <label class="sr-only" for="postal_code">postal code</label> <input type="text" class="form-control" id="postal_code" name="postal_code" placeholder="postal code" ng-model="currentaddress.postal_code" > </div> <div class="form-group"> <label class="sr-only" for="country">country</label> <input type="text" class="form-control" id="country" name="country" placeholder="country" autofocus ng-model="currentaddress.country"> </div> <div class="form-group"> <div class="alert alert-danger" role="alert" ng-show="errormsg">{{errormsg}}</div> <div class="alert alert-success" role="alert" ng-show="successmsg">{{successmsg}}</div> <button type="submit" class="btn btn-lg btn-primary btn-block" id="button-update-address" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> updating address...">update address</button> </div> </form> </div>
this 1 second form
<div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">payment summary</h3> </div> <div class=" "> <form id="confirm-order" name="confirm_order" method="post" action=""> <div class="form-group"> <?php if($con->returned_rows): $row = $con->fetch_assoc(); ?> <table class="table"> <tr> <td> sub total </td> <td><?php print $row['subtotal'] ;?><input type="hidden" name="subtotal" value="<?php print $row['subtotal'] ;?>"/></td> </tr> <tr> <td>total items </td> <td><?php print $row['total_qty'] ;?></td> </tr> <tr> <td>shipping</td> <td><?php //print $row['total_qty'] ;?></td> </tr> </table> <?php endif; ?> </div> <div class="form-group"> <input type="submit" name="confirm" class="btn btn-lg btn-primary btn-block" value="confirm order"/> </div> </form> </div>
angular has directive named form
, because of considers form directive in angular-scope.
if want directive out of angular-scope, use ngnonbindable
<form ng-non-bindable> ..... </form>
Comments
Post a Comment