All Projects → mmautomatizacion → mm.angular-fullpage.js

mmautomatizacion / mm.angular-fullpage.js

Licence: MIT license
Angular directive for use the jQuery fullPage.js library on Angular.js v1.x

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to mm.angular-fullpage.js

Fullpage.js
fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple
Stars: ✭ 32,974 (+193864.71%)
Mutual labels:  slide, fullpage
tweenslideshow
A simple slideshow using Tweenmax
Stars: ✭ 34 (+100%)
Mutual labels:  slide
Viewholder Slide Helper
recyclerview holder animation
Stars: ✭ 169 (+894.12%)
Mutual labels:  slide
Rmarkdown tutorial
Reproducible Research with Rmarkdown: data management, analysis, and reporting all-in-one
Stars: ✭ 18 (+5.88%)
Mutual labels:  slide
Androidpilelayout
An abnormal horizontal ListView-like pile layout with stretch and contraction effects.
Stars: ✭ 2,104 (+12276.47%)
Mutual labels:  slide
promise-yes
Slide about how to use Promise in JavaScript.
Stars: ✭ 13 (-23.53%)
Mutual labels:  slide
Kittik
Create slides in TypeScript and present them in the terminal using ASCII only!
Stars: ✭ 147 (+764.71%)
Mutual labels:  slide
channel9
Channel9 PowerShell scripts to download Powerpoint Slides and videos
Stars: ✭ 19 (+11.76%)
Mutual labels:  slide
python4selftrackers
Presentations on Quantified Self and Self-Tracking with Python
Stars: ✭ 26 (+52.94%)
Mutual labels:  slide
RNSlidingButton
React Native Button component which support Slide event to perform action.
Stars: ✭ 19 (+11.76%)
Mutual labels:  slide
Slideovercard
A SwiftUI card view, made great for setup interactions.
Stars: ✭ 228 (+1241.18%)
Mutual labels:  slide
Vue Infinite Slide Bar
∞ Infinite slide bar component (no dependency and light weight 1.48 KB)
Stars: ✭ 190 (+1017.65%)
Mutual labels:  slide
company-introduction-jp
日本の会社紹介スライドのまとめです。
Stars: ✭ 49 (+188.24%)
Mutual labels:  slide
Springy facebook rebound
Springy makes Android Property animation easy to use.
Stars: ✭ 176 (+935.29%)
Mutual labels:  slide
android-lecture
android lecture notes
Stars: ✭ 25 (+47.06%)
Mutual labels:  slide
Cs193p 2017 Fall Demo And Solution
it's slide, demo and assignment of cs193p 2017 fall
Stars: ✭ 164 (+864.71%)
Mutual labels:  slide
Nuka Carousel
Pure React Carousel Component
Stars: ✭ 2,607 (+15235.29%)
Mutual labels:  slide
Slide
Slide is an open-source, ad-free Reddit browser for Android.
Stars: ✭ 1,733 (+10094.12%)
Mutual labels:  slide
resumify
Capture screenshot and make PDF on your HTML presentation.
Stars: ✭ 28 (+64.71%)
Mutual labels:  slide
demo fullpage
🚀 Demonstriert eine Onepage-Website auf Basis von REDAXO 5, fullPage.js und UIkit
Stars: ✭ 36 (+111.76%)
Mutual labels:  fullpage

MM Angular fullPage.js

Angular directive for use the jQuery fullPage.js library on Angular.js v1.x


This code is a completely adapted version of fullPage.js library developed by Alvaro Trigo for working with Angular.js v1.X.


Donate for this project!!

Donate

Donate for original jQuery project (Alvaro Trigo)!!

Donate

Working example

You can check a working example on our company website, http://www.mmautomatizacion.com

Installation

This library works with jQuery, so we have to include this library.

Then, you have to include the MM Angular fullPage.js library into the HTML. Download the last release from github and include the source or minified file like another JS code:

<script type="text/javascript" src="mm.angular-fullpage.min.js"></script>

You also have to include the CSS stylesheet

<link type="text/css" rel="stylesheet" href="mm.angular-fullpage.min.css">

Using Bower or NPM

You can install MM Angular FullPage.js using Bower or NPM:

Bower

bower install mm.angular-fullpage.js

NPM

npm install mm.angular-fullpage.js

Inject module

For work, you may inject the directive to your angular app. The module name is fullpage.js:

(function() {
	'use strict';

	angular
		.module('app', ['fullpage.js']);
})();

First steps

The use of the Angular fullPage directive is very similar to the use of the original jQuery fullPage.js library of Alvaro Trigo. You only have to use the full-page attribute into a div, and define sections and slides.

<div full-page>
  <div class='section' data-anchor='section1'></div>
  <div class='section' data-anchor='section2'>
    <div class='slide' data-anchor='slide1'></div>
    <div class='slide' data-anchor='slide2'></div>
  </div>
</div>

Link to sections and slides

For linking, we only have to use this href format: #!SECTION/SLIDE. I recommend to use the angular ng-href instead of original href.

<a ng-href='#!firstPage'>
<a ng-href='#!secondPage/2'>

Options. The Angular FullPage Config Provider

For configure the behaviour of Angular fullPage.js we can use a config provider, named 'fullPageConfig', and define the options object throw 'setConfig' function. Here's an complete example with all options:

(function() {
	'use strict';

	angular
		.module('app')
		.config(function(fullPageConfigProvider) {
			fullPageConfigProvider.setConfig({
				//Navigation
		        menu: '#menu',
		        lockAnchors: false,
		        anchors:['firstPage', 'secondPage'],
		        navigation: false,
		        navigationPosition: 'right',
		        navigationTooltips: ['firstSlide', 'secondSlide'],
		        showActiveTooltip: false,
		        slidesNavigation: false,
		        slidesNavPosition: 'bottom',

		        //Scrolling
		        css3: true,
		        scrollingSpeed: 700,
		        autoScrolling: true,
		        fitToSection: true,
		        fitToSectionDelay: 1000,
		        scrollBar: false,
		        easing: 'easeInOutCubic',
		        easingcss3: 'ease',
		        loopBottom: false,
		        loopTop: false,
		        loopHorizontal: true,
		        continuousVertical: false,
		        continuousHorizontal: false,
		        scrollHorizontally: false,
		        interlockedSlides: false,
		        dragAndMove: false,
		        offsetSections: false,
		        resetSliders: false,
		        fadingEffect: false,
		        normalScrollElements: '#element1, .element2',
		        scrollOverflow: false,
		        scrollOverflowReset: false,
		        scrollOverflowOptions: null,
		        touchSensitivity: 15,
		        normalScrollElementTouchThreshold: 5,
		        bigSectionsDestination: null,

		        //Accessibility
		        keyboardScrolling: true,
		        animateAnchor: true,
		        recordHistory: true,

		        //Design
		        controlArrows: true,
		        verticalCentered: true,
		        sectionsColor : ['#ccc', '#fff'],
		        paddingTop: '3em',
		        paddingBottom: '10px',
		        fixedElements: '#header, .footer',
		        responsiveWidth: 0,
		        responsiveHeight: 0,
		        responsiveSlides: false,

		        //Custom selectors
		        sectionSelector: '.section',
		        slideSelector: '.slide',

		        lazyLoading: true,
			});
       	});

})();

We can also add events in the config object:

(function() {
	'use strict';

	angular
		.module('app')
		.config(function(fullPageConfigProvider) {
			fullPageConfigProvider.setConfig({
				lazyLoading: true,
				onLeave: function(index, nextIndex, direction){},
		        afterLoad: function(anchorLink, index){},
		        afterRender: function(){},
		        afterResize: function(){},
		        afterResponsive: function(isResponsive){},
		        afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex){},
		        onSlideLeave: function(anchorLink, index, slideIndex, direction, nextSlideIndex){}
			});
       	});

})();

You can find complete information about options in the original jQuery project readme.

Methods. The Angular FullPage Service

You can interact with Angular FullPage by the Angular FullPage Service. Only you have to do is inject the service "fullPageService" and enjoy. There is an example that move section up on load:

(function() {
	'use strict';

	angular
		.module('app')
		.controller('app.indexCtrl', indexCtrl);


	indexCtrl.$inject = ['fullPageService'];


	function indexCtrl(fullPageService) {
		fullPageService.moveSectionUp();
	}

})();

You can find all the possible methods to configure in the original jQuery project readme.

Current Section and Slide

We have added an additional method to the original project, named "status". This one allow to know which section and slide are on screen.

fullPageService.status.anchorLink; // Current section anchor
fullPageService.status.sectionIndex; // Current section index
fullPageService.status.slideIndex; // Current slide index
fullPageService.status.slideAnchor; // Current slide anchor

Events (callbacks)

All the events about Angular Fullpage are emitted by $rootScope. It allow to access this events in any controller of the app.

  • fp-afterLoad data => { anchorLink , index }
  • fp-onLeave data => { index , nextIndex , direction }
  • fp-afterRender data => { }
  • fp-afterResize data => { }
  • fp-afterResponsive data => { isResponsive }
  • fp-afterSlideLoad data => { anchorLink , index , slideAnchor , slideIndex }
  • fp-onSlideLeave data => { anchorLink , index , slideIndex , direction , nextSlideIndex }

How to use

$rootScope.$on('fp-afterLoad', function(event, data) {
	console.log(data);
});

What's next?

For further information and complete documentation, you have to access the official site of the original jQuery fullPage.js library

Keep in mind

  • This project contains the complete code of the original modified for work with Angular. Is not necessary (and not recommended) to include the jQuery original library.
  • Angular fullPage.js is not compatible with Angular routing (ngRoute, uiRoute...).
  • You can use HTML5 mode.
  • If you have any doubt, contact me.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].