angular directive scope got overriden

37 views Asked by At

I am trying to use isolated scope for a directive which is having two way data binding. Please refer my code below:

function singleSelectDropdownList(methodCallHelper, $timeout) {
    var singleDropdownListDirective = {
            restrict: 'EA',
            scope: {
                    info: "="
            },
            templateUrl: 'App/templates/ui-framework/single-select-dropdown.html',
            link: linkFunc
    };
    function linkFunc(scope, element, attributes) {
            //.. directive code goes here
    }
    return singleDropdownListDirective;
}

my problem over here is that initially everything works fine but my directive persists the scope of the last directive element. If I do any action for any previous element the last element is updated.

0

There are 0 answers