Call jquery plugin in directive only after data is renderer in DOM
问题 I want to initialize a jquery plugin in an angular directive but only after the service data is returned and first renderer in the DOM. I can seem to figure out how to do this in angular directive. I have this code so far, but it seems that i am calling the plugin after the service data arrived, but before it is renderer on the DOM... Any hints? myApp.directive('myDirective', function () { return { restrict: 'A', link: function ($scope, element, attrs) { $scope.$watch("data.length", function(