Skip to content

Instantly share code, notes, and snippets.

@mcranston18
Created July 31, 2014 15:29
Show Gist options
  • Save mcranston18/06c6943cbd44ece679d0 to your computer and use it in GitHub Desktop.
Save mcranston18/06c6943cbd44ece679d0 to your computer and use it in GitHub Desktop.
'use strict';
angular.module('app.picture')
.directive('pictureList', function() {
return {
restrict: 'E',
scope: {
pictures: '='
},
transclude: true,
controller: function($scope) {
$scope.loadMore = function() {
// some code
};
},
template:
'<ul infinite-scroll="loadMore()">' +
'<li ng-repeat="photo in photos">' +
// do stuff
'<div ng-transclude></div>' +
'</li>' +
'</ul>'
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment