Any reason why you're building the DOM here rather than using Angular's ng-repeat (or ng-options)?