-
Notifications
You must be signed in to change notification settings - Fork 31
/
angular-fullpage.min.js
1 lines (1 loc) · 1.12 KB
/
angular-fullpage.min.js
1
!function(){"use strict";function n(n){function o(o,e){var t,i,f,a,u;"object"==typeof o.options?(o.options.afterRender&&(f=o.options.afterRender),o.options.onLeave&&(a=o.options.onLeave),o.options.onSlideLeave&&(u=o.options.onSlideLeave)):"undefined"==typeof options&&(o.options={});var r=function(){c(),$(e).fullpage(l(o.options)),"function"==typeof f&&f()},c=function(){$.fn.fullpage.destroy&&$.fn.fullpage.destroy("all")},l=function(o){function e(){o&&o.navigation&&$("#fp-nav").find("a").removeAttr("href"),t&&n(function(){$.fn.fullpage.silentMoveTo(t,i)})}function f(n,o,e){return"function"==typeof a&&a(n,o,e)===!1?!1:void(t=o)}function r(n,o,e,f,a){return"function"==typeof u&&u(n,o,e,f,a)===!1?!1:(t=o,void(i=a))}return o.afterRender=e,o.onLeave=f,o.onSlideLeave=r,$(document).on("click","[data-menuanchor]",function(){$.fn.fullpage.moveTo($(this).attr("data-menuanchor"))}),o},p=function(){return e[0].getElementsByTagName("*").length};o.$watch(p,r),o.$watch("options",r,!0),e.on("$destroy",c)}var e={restrict:"A",scope:{options:"="},link:o};return e}angular.module("fullPage.js",[]).directive("fullPage",n),n.$inject=["$timeout"]}();