I'm starting to play around with AngularJS forms in jsfiddle and I've come across a problem already where a very simple form example is not working as expected. All I have is a named form and it's not showing up in scope for some reason (I'm expecting a FormController instance).
I have a fiddle set up, and below is the basic code:
HTML
<div id="mainContainer" ng-app="angularTest" ng-controller="MainCtrl">
<h1>The Form</h1>
<form name="theForm">
<input name="myName" type="text" ng-model="model.name" />
<input name="submit" type="submit" />
</form>
</div>
JS
var app = angular.module('angularTest', []);
app.controller('MainCtrl', ['$scope', function($scope) {
$scope.model = { name: 'Model Name' };
console.log($scope.theForm); //displays 'undefined'
}]);
I can't find a lot of straightforward examples of this on jsfiddle, so I wasn't sure if this could be some strange interaction with sites like it (most examples I find aren't using formal controllers). I've tried on Plunker to check as well, but I encounter the same problem.
I'm sure I'm missing something super obvious, but I can't see many other things to change or tweak here. Any help is greatly appreciated!