title: Getting data from Json for different Views
body: <p>I've two buttons List View and Card View.</p>
  
  <p>When i click on listview button i wanted to make a http call to fetch 20 data's. Same way i wanted to fetch 10 data when user hit's on  the card view.</p>
  
  <p>So far i can able to display 10 records for both the view. I need some help to implement this feature.</p>
  
  <p>I'm setting page-size = 10// Somehow i need to change the page-size to 20 when i'm in list view. Please help</p>
  
  <pre class="lang-js prettyprint-override"><code>// i'm setting the page-size = 10 
  
  fetchDynamic: function(amount, startingPoint, query) {
    var _this = this;
  
    function process(articles) {
      var convArt = [];
  
      for (var i = 0, len = articles.length; i &lt; len; i++) {
        var article = articles[i];
        var trackerLabel;
  
        if (article.title) {
          trackerLabel = article.shortTitle.toString().split(' ');
          trackerLabel = trackerLabel[0] + '-' + trackerLabel[1] + '-' + trackerLabel[2];
        } else {
          trackerLabel = 'no title';
        }
  
        convArt.push({
          link: article.path,
          image: article.fileReference,
          label: article.contentTypeTitle[0],
          'date-time': moment(article.articleDate).format('DD MMMM YY'),
          title: article.shortTitle || '',
          desc: article.shortIntro || '',
          'link-desc': 'Keep reading',
          trackerEi: ++_this.trackerId + '-' + trackerLabel
        });
      }
  
      return convArt;
    }
  
    return new Promise(function(resolve, reject) {
      query = query || '';
      var path = _this.options.path + '&amp;page-size=' + amount + '&amp;page-no=' + startingPoint + '&amp;' + 'exact-match=true' + query;
  
      $.ajax(path, {
        type: 'GET',
        dataType: 'json',
        success: function(data) {
          _this.maximumResults = data.results;
          resolve(process(data.data));
        },
        error: function(err) {
          reject(err);
        }
      });
    });
  }
  </code></pre>