I have started an angularjs project and I would like to implement fancybox.
For this, I have included the jQuery and fancybox plugins to the solution. I am attemptin
I have created a directive for fancybox
app.directive('fancybox',function($compile, $timeout){
return {
link: function($scope, element, attrs) {
element.fancybox({
hideOnOverlayClick:false,
hideOnContentClick:false,
enableEscapeButton:false,
showNavArrows:false,
onComplete: function(){
$timeout(function(){
$compile($("#fancybox-content"))($scope);
$scope.$apply();
$.fancybox.resize();
})
}
});
}
}
});