RawSushi's Tech Journal
My online tech scrapbook where I keep my notes in case I need to look them up later
Sunday, October 7, 2012
AngularJS Select Input
In HTML template
<select ng-model="langId" ng-options="lang.id as lang.name for lang in languages">
</select>
In the controller
$scope.languages = [
{id:'en', name:'English'},
{id:'zh', name:'Chinese'}, etc....
];
Example fiddle:
http://jsfiddle.net/2JWb2/5/
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment