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
The form only registers itself with the $scope of the controller after the controller has initially run. Therefore the console.log($scope.theForm) will return undefined even if everything is setup correctly.
In your example to react to the presence of theForm, you can setup a watcher on theForm to set debug text depending its presence:
$scope.$watch('theForm', function(theForm) {
if(theForm) {
$scope.formDebugText = 'Form in Scope';
}
else {
$scope.formDebugText = 'Form is Undefined';
}
});
which can be seen in action at http://jsfiddle.net/9k2Jk/1/