Hi,
I am Posting My data on controller using Angularjs Now i want to Validate on Some Fields Can Some One Help me How can i do that.
Angularjs
- $scope.savedata = function () {
- $scope.btn = true;
- $http({
- method: 'POST',
- url: '@Url.Action("LRData","GRPO")',
- data: { 'Docentry': $scope.grpo, 'batch': $scope.b }
- }).success(function (data) {
- alert(data);
- });
- }
Html
- <table class="table table-bordered table-hover">
- <thead class="thead-dark">
- <tr>
- <th>Item Code</th>
- <th>Description</th>
- <th>Quantity</th>
- <th>Batch No</th>
- <th>LR No</th>
- <th>LR Date</th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat="t in b">
- <td class="bg-color">{{t.ItemCode}}</td>
- <td class="bg-color">{{t.Description}}</td>
- <td class="bg-color">{{t.Qty}}</td>
- <td class="bg-color">{{t.Batch}}</td>
- <td><input type="text" ng-model="t.LrN" class="form-control" /></td>
- <td><input type="date" ng-model="t.LrD" class="form-control" /></td>
- </tr>
- </tbody>
- </table>
-
-
- <input type="button" value="Save" class="btn btn-outline-primary" ng-click="savedata()" ng-disabled="btn" />
please Help me will be vary thakful