Q:

AngularJS passing an attribute value as a parameter in a function called by ng-change

I can't seem to wrap my mind around how I would pull this off.  I have a directive which looks like the following:
.directive('seqWidget', ['Sequence', function(Sequence){
    return {        
        restrict: 'E',
        scope: {
            placeholder: '@',
            option: '@'
        },
        template: '<fieldset><legend data-ng-transclude></legend><input type="text" placeholder = {{placeholder}} autofocus data-ng-model="index" data-ng-change="retrieve({{option}});"/>{{output}}</fieldset>',
        replace: true,
        transclude: true,
        link: function ($scope, $elem, $attr){

            $scope.retrieve = function(key){
                //var option = $attr.option;
                console.log(key);
            }
        }
    }
}]);

My HTML is as such:
<seq-widget placeholder="Index 0-400" option="accurate">Which index number would you like to gain accuracy on?</seq-widget>

I have tried several other ways of accomplishing a dynamic way of changing my function call based on an attribute value.  I would use the '&' prefix but I'd like for this function to be triggered anytime the input is changed.  Is there a practical way to achieve what I am trying to do?  Or do I need to use jQuery to say something like $('input').on('change', function(){}); in my link function?

A:

You do not have to pass option it is already in the scope, while you set up a text binding option: '@'.
So just do:-
        $scope.retrieve = function(key){
            console.log($scope.option);
        }

It will also work if you remove interpolation, you do not have to interpolate scope variables in an expression.
 data-ng-change="retrieve(option);"

