Demo entry 2330921

sdfsf

   

Submitted by anonymous on Jul 24, 2015 at 20:20
Language: JavaScript. Code size: 523 Bytes.

    link: function(scope) {
      var maxPages = 7;
      var defaultSize = 10;
      var i;

      scope.sizes = [10, 25, 50];

      translate.async('components.pagination.label.results')
        .then(function(value) {
          scope.resultText = value;
        });

      function inBounds(page) {
        return page >= 1 && page <= scope.totalPages;
      }

      function isValidSize(size) {
        return scope.sizes.some(function(item) {
          return size === item;
        });
      }

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).