Skip to content

Instantly share code, notes, and snippets.

@tkc
Created September 23, 2015 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkc/fd271bf3571722cfcb55 to your computer and use it in GitHub Desktop.
Save tkc/fd271bf3571722cfcb55 to your computer and use it in GitHub Desktop.
<select ng-model="selectTag" ng-options="k as v for (k,v) in selectList"></select>
選択された値 = @{{ selectTag }}
$scope.selectList = {
10: "睦月",
2: "如月",
3: "弥生",
4: "卯月"
};
$scope.selectTag = 3;
@tkc
Copy link
Author

tkc commented Sep 23, 2015

 <select ng-options="color for color in ['red', 'blue', 'yellow']" ng-model="color1">
        <option value="" selected>--Please select your color--</option>
    </select>

    選択された値 = @{{ color1 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment