My problem is that for each select option I need to call a different function, not the same function.
I started with ng-click on each select option but quickly realized this doesn't work. I then read Angular's documentation on ng-options https://docs.angularjs.org/api/ng/directive/ngOptions
The documentation illustrates using ng-change but it is based on the fact that each select option gets the same function applied to it.
After thinking about this for a bit I ended up creating a function that gets called on ng-change. This function just determines which delegate to call.
$scope.determineAction = function() {
var getDelegation = $injector.get($scope.selected.action);
getDelegation.delegate();
}
Plunker: http://plnkr.co/edit/2Str6OqmFDH3kKdiW6i5
I've created a solution to my problem but I want to know if this is the right approach? Am I missing something in ng-options that allows for many different function calls?