I'm a bit new in angular.js and I wonder how to proper implement fullpage.js into angular.js. I tried to add fullpage as example ...
this code direct into controller i wanted to use for fullpage.js
$('#fullpage').fullpage({
sectionsColor: ['#21f7ff', '#bdcc4b', '#fcae49'],
});
but the problem is when I put this code into controller i wont recongnize nothing else... ( other functions for click)
my exmaple of implementation in controller :
'use strict';
angular.module('APP')
.controller('MainCtrl', function ($scope,Auth) {
$('#fullpage').fullpage({
sectionsColor: ['#21f7ff', '#bdcc4b', '#fcae49'],
});
$scope.moveUp = function(){
$.fn.fullpage.moveSectionUp();
};
$scope.moveDown = function(){
$.fn.fullpage.moveSectionDown();
};
});
view :
<div id="fullpage">
<div class="section">
<button class="button" ng-click="moveDown()">Down</button>
</div>
<div class="section">
<button class="button" ng-click="moveUp()"> Up </button>
</div>
</div>
I'm using angular-fullastack-generator for project start so this is a partial view.
My general question is how to proper implement fullpage.js into angular.js ?