0
我在選擇ng選項中插入值,我想在特定月份的下拉列表中選擇。 這是返回所有12個月arrray,所以我如何才能從下拉菜單中提取僅選定的月份。AngularJS如何從ng選項中選擇值
腳本:
$scope.Month = ['Jan', 'Feb', 'March', 'April', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
$scope.selectmonth = $scope.Month;
$scope.SaveReport = function() {
PrintReportRepository.save(
{
SelectMonth: $scope.selectmonth,
},
HTML
<select class="form-control" ng-model="selectmonth" ng-options ="months as months for months in Month">{{months}}</select>