Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- italic.directive("widthLimit",
- ['$window', function($window){
- return{
- link: function(scope, element, attrs){
- var width = $window.innerWidth;
- if(width < 768){
- scope.limit = 5;
- }
- }
- }
- }]);
- //Usage:
- //ng-repeat="item in items | limitTo:limit"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement