I´m trying to get the value from a dropdown when submitting a form in AngularJS but ends up with an undefined value. See this fiddle: http://jsfiddle.net/ironhead/Td2NZ/280/ textfields works with $scope.nameoftextbox but how to get the name/value of a dropdown?
<form ng-submit="submitForm()" novalidate>
<select name="test" ng-model="form.type" ng-options="option.name for option in typeOptions" ></select>
<input type="submit" value="submit">
</form>
<script>
$scope.submitForm = function (post) {
alert($scope.test);
}
</script>
form.typeso$scope.form.type