angularjs - Submit Form in Angular Modal -


i have modal lives in url /admin.brands/edit , here code:

<%@page language="java" contenttype="text/html; charset=utf-8" pageencoding="utf-8"%>  <%@taglib tagdir="/web-inf/tags" prefix="tags"%> <%@taglib uri="/web-inf/tlds/fields.tld" prefix="fields"%>   <div class="row-fluid sortable">     <div class="box span12">         <div class="box-content">         <form class="form-horizontal" name="brandform" action='/admin.brands/update' data-toggle="validate" method="post">             <fields:form formname="brand.id.form">                  <input type="hidden" name="brandid" value="{{item.brandid}}"/>             </fields:form>              <fields:form formname="brand.form">                   <div class="section-heading"></div>                 <div class="control-group">                     <label class="control-label" for="selecterror"><tags:label text="name"/> *</label>                     <div class="controls">                          <input name="name" value="{{item.name}}" required/>                     </div>                 </div>                 <div class="control-group">                     <label class="control-label" for="selecterror"><tags:label text="isactive"/> </label>                     <div class="controls">                         <input type="checkbox" ng-checked="item.isactive" name="isactive" value="1"/>                      </div>                 </div>             </fields:form>                  <div class="form-actions">                     <a ng-click="cancel()" class="btn btn-ext-lightblue"><tags:label text="close"/></a>                     <button type="submit" ng-click="ok()" class="btn btn-ext-darkblue btn-disable-on-submit" ><tags:label text="save"/></button>                 </div>         </form>     </div> </div> </div> 

and controller:

    app.controller("brandctrl", function ($scope, $http, $modal) {         $scope.animationsenabled = true;         $scope.open = function (id) {             var modalinstance = $modal.open({                 animation: $scope.animationsenabled,                 templateurl: '/admin.brands/edit',                 controller:gg,                 resolve: {                     item: function($http) {                         return $http.get('/admin.brands/getjsonbrandandedit?brandid=' + id)                             .then(function(response) {                                 return response.data;                             });                     }                 }             });         }     });  var gg = function ($scope, $modalinstance, item) {     $scope.item  =  item;     $scope.ok = function () {         $scope.form.brandform.submit();         $modalinstance.close();       };        $scope.cancel = function () {          $modalinstance.dismiss();       }; } 

my question is; how can submit form url '/admin.brands/updatebrand' ?

i tried form values adding ng-model didn't work.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -