Here is how my form begins:
<!-- form -->
<form ng-submit="form.submit()" class="form-horizontal" role="form" style="margin-top: 15px;">
<div class="form-group">
<label for="inputUrl" class="col-sm-2 control-label">URL</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputUrl" name="inputUrl" ng-model="form.url" />
</div>
</div>
</form>
and the accompanying js controller starts like this:
$scope.form = {};
$scope.form.submit = function() {
console.log($scope.form);
var url = $scope.form[url];
console.log("Url is " + url);
}
The variable 'url' appears as undefined in the console. How can I rectify this?