我想将$ error字段设置为$ touched,但是我注意到即使我在console.log $scope.vm.InwardLeaseForm
上也能看到它,但我无法访问$scope
。
$scope.vm.InwardLeaseForm
和vm.InwardLeaseForm
都返回未定义。
这是我的表格
<div class="col-xs-12 btm40">
<h2 class="subHead">Lease Details</h2>
<div>
<form name="vm.InwardLeaseForm" ng-submit="vm.saveInwardLeasingForm()" novalidate>
<formly-form model="vm.InwardLeaseModel" fields="vm.InwardLeaseFields"
options="vm.InwardLeaseOptions" form="vm.InwardLeaseForm"></formly-form>
<div class="top20">
<button class="btn btn-primary" type="submit" ng-hide="vm.vehicleLockedFlag || vm.acquisitionCancelledFlag">Save</button>
</div>
</form>
</div>
如您所见,它出现在$scope