Here is my form
<form ng-submit="search()" name="SearchForm" method="POST">
<th ng-repeat="v in trail_row">
<div ng-switch on="v">
<select ng-model="fromLocationName" class="input-medium"
ng-switch-when="from_location_name" ng-options="l.Name for l in locations">
</select>
<select ng-model="toLocationName" class="input-medium"
ng-switch-when="to_location_name" ng-options="l.Name for l in locations">
</select>
<input ng-switch-default ng-keyup="$event.keyCode == 13 ?
search() : null" class="input-medium" type="text" name="{{v}}"
ng-model="$parent[v]">
</div>
</th>
<input type="submit" id="submit" value="Submit"/>
</form>
And my js as below
$scope.search = function(){
console.log($scope.fromLocationName);
console.log($scope.toLocationName);}
It is giving me undefined value for selected option values from the above
code with ng-repeat, but I cross checked without using ng-repeat it works
fine.
I am fairly new to angularJs, Please help any body
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.