Angular: Select not Showing Options
Date: 2015-07-30 |
**Problem: **I’m trying to create a
**Solution: **Make sure you’ve added options to populate your selector and an ng-model variable to hold the selected option. If you don’t have the options, there won’t be anything for the selector to pull in. If you don’t have an ng-model, Angular won’t display anything inside of your selector.
Example:
[[https://gist.github.com/SIRHAMY/42b1111f2b4d09021a3a](https://gist.github.com/SIRHAMY/42b1111f2b4d09021a3a)]Remember, the options are usually pulled in from a $scope.variable created in a controller. The ng-model variable will be accessible in any controller that has access to the surrounding select element.
Want more like this?
The best / easiest way to support my work is by subscribing for future updates and sharing with your network.