考虑我有一个表格,ng-form
一个控制器 -
var myAppModule = angular.module('myApp', []);
myAppModule.controller('myCtrl',function ($scope) {
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js"></script>
<div ng-app="myApp">
<div ng-controller="myCtrl" ng-form name="myForm">
Name : <input ng-model="name" type="text" />
</div>
</div>
我怎样才能在控制器内访问myCtrl
表单 - myForm
?