I'm trying to check the $valid property of the form in my view:
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Form</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script>
<script src="app.js"></script>
<script src="controller.js"></script>
</head>
<body ng-controller="FormController as $ctrl">
<form name="$ctrl.myForm">
<div>
<input type="text" name="myName" ng-model="$ctrl.name">
</div>
</form>
</body>
</html>
My Controller:
(function(){
angular.module('app').controller('FormController', formController);
function formController(){
var vm = this;
vm.name = 'John';
console.log(vm);
}
})();
My App:
(function(){
var app = angular.module('app',[]);
})();
Not sure what the problem is but I keep getting error below:

I just tried to print the 'vm' to the console, and I got the below:

How do I access 'myForm' property form the 'vm'?
$ctrl.before the form name in your html. It should just be<form name="myForm">and then you can access it the way you are attempting to.