ng-options with a dynamic expression is not working
问题 I'm trying to create a directive in angular, to replace the regular dropdown. I need to be able to set a dynamic expression to ng-options but doesn't seem to be working inside the directive. It works perfectly outside it. This is the directive angular.module('app.dropdown',[]) .directive('swDropdown',[ function ( ){ return { restrict: 'E', replace: true, template:'<div><select ng-model="swModel" ng-options="{{expression}}" ></div>', link: link, scope:{ swOptions:"=", swLabel:'@', swValue:'@',