Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('carouselApp')
- .directive('waProgress', ['Pages', 'Carousel', '$window', '$timeout', function(Pages, Carousel, $window, $timeout) {
- return {
- scope: {
- pages: "="
- },
- templateUrl: 'views/wa.progress.html',
- transclude: true,
- require: '^waCarousel',
- link: function(scope, el, attrs, ctrl) {
- // console.log();
- scope.progressed = false;
- scope.$root.subscribe('updateCarousel', function(params){
- // console.log('asdfasdf', params);
- scope.progress = params;
- scope.passedProgress = function(idx){
- if(scope.progress.currentPage > idx){
- console.log(el.width());
- return scope.progressed = true;
- // scope.animatedWidth = $
- }
- }
- });
- scope.futureProgress = function(idx) {
- console.log(idx)
- };
- }
- }
- }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement