code: function handleWindowResize () {
      ctrl.lastSelectedIndex = ctrl.selectedIndex;
      ctrl.offsetLeft        = fixOffset(ctrl.offsetLeft);
  
      $mdUtil.nextTick(function () {
        ctrl.updateInkBarStyles();
        updatePagination();
      });
    }
docs: Update size calculations when the window is resized.