Skip to content

Instantly share code, notes, and snippets.

@JaKXz
Last active December 23, 2015 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JaKXz/367921c102b838221565 to your computer and use it in GitHub Desktop.
Save JaKXz/367921c102b838221565 to your computer and use it in GitHub Desktop.
angular.module('myApp.directives.mySlickCarousel', [])
.controller('CarouselController', function () {
// stuff
})
.directive('priorityNotifications', function () {
return {
restrict: 'E',
templateUrl: 'template.html',
replace: true,
controller: 'CarouselController as carouselCtrl',
scope: {
notifications: '='
},
bindToController: true
};
});
<div class="priority-notifications">
<slick class="card" data="carouselCtrl.notifications" infinite="true" dots="true">
<div class="item item-text-wrap"
ng-repeat="n in carouselCtrl.notifications track by $index">
<span ng-bind-html="n.message"></span>
</div>
</slick>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment