code: function (event, method) {
              if (methods.indexOf(method.toUpperCase()) !== -1) {
                showLoader = (event.name === 'loaderShow');
              } else if (methods.length === 0) {
                showLoader = (event.name === 'loaderShow');
              }
  
              if (ttl <= 0 || (!timeoutId && !showLoader)) {
                $scope.showLoader = showLoader;
                return;
              }
              if (timeoutId) {
                return;
              }
  
              $scope.showLoader = showLoader;
              timeoutId = $timeout(function () {
                if (!showLoader) {
                  $scope.showLoader = showLoader;
                }
                timeoutId = undefined;
              }, ttl);
            }
docs: Toggle the show loader.
  Contains the logic to show or hide the loader depending
  on the passed method
  
  @param {object} event
  @param {string} method