1

i am using Angular directive which has a link function. The dom page has the pagination and this directive is present in the second page and because of which the link function is not getting executed when i navigate to second page. Can you let me know how to resolve this issue ?

angular.module("module")
.directive("directive", function (){
    return {
        restrict: "C",
        templateUrl: templateUrl,
        replace: true,
        link: function (scope, element, attrs) {

            //function to be executed


        },
        controller: "controller"
    };

}])

user3496151
  • 181
  • 1
  • 13
  • We need to see some code to be able to help. – dcodesmith Feb 04 '15 at 19:11
  • added the code..this is the directive code which has a function call...this directive is present in the second page and there is no page load – user3496151 Feb 04 '15 at 19:22
  • That still doesn't mean anything. You'd need to include the Controllers code and probably the template. – dcodesmith Feb 04 '15 at 19:23
  • The code is simple and straight forward...i will try to add that code in the mean time the issue is simple..the directive is loaded in the second page and not first page and my link function is not firing.If its single page then link function executes properly.. – user3496151 Feb 04 '15 at 19:51

0 Answers0