Skip to content

Instantly share code, notes, and snippets.

@stuf
Last active August 29, 2015 13:55
Show Gist options
  • Save stuf/8768325 to your computer and use it in GitHub Desktop.
Save stuf/8768325 to your computer and use it in GitHub Desktop.
slideshow angular test
// window.app is initialized as: window.app = window.app || angular.module('appName', []);
window.app.directive(
'soluSlideshow',
function () {
'use strict';
var defaultConfig = {
infiniteLoop: false
};
var callback = function link( scope, element, attrs ) {
var _options = $.extend( {}, defaultConfig, {
'pager': (attrs['showPager'] != null && attrs['showPager'] === 'show'),
'controls': (attrs['showControls'] != null && attrs['showControls'] === 'show')
} );
$( element ).bxSlider( _options );
};
return {
restrict: 'A',
scope: {
showPager: '=',
showControls: '='
},
link: callback
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment