dropdown binding using ng-repeat directive

Kmandapalli
Posted by Kmandapalli under AngularJS category on | Points: 40 | Views : 419
var app = angular.module('sampleapp', [])
app.controller('samplecontrol', function ($scope) {
$scope.sample = [{
id: '1',
name: 'JavaScript'
}, {
id: '2',
name: 'JQuery'
}, {
id: '3',
name: 'Angular JS'
}];
});
</script>
</head>
<body data-ng-app="sampleapp" data-ng-controller="samplecontrol">
<form id="form1">
Select Name:
<select>
<option data-ng-repeat="t in sample" value="{{t.id}}">{{t.name}}</option>
</select>
</form>

Comments or Responses

Posted by: Jayakumars on: 7/27/2015 Level:Bronze | Status: [Member] [MVP] | Points: 10
Hi
Can you post full code

Login to post response