Skip to content Skip to sidebar Skip to footer

Pass Argument To Directive In Angularjs?

I want to pass argument to directive in angularjs. I found some thread on stackoverflow Angularjs - Pass argument to directive But it is not helped me. Directive: app.directive('da

Solution 1:

You should use scope.format to retrieve the value of the format attribute

link: function (scope, element, form) {
    $(element).datepicker({
        dateFormat: scope.format,
    });
}

Post a Comment for "Pass Argument To Directive In Angularjs?"