function setLoading(value) {
    if (ctrl.loading !== value) {
      ctrl.loading = value;
    }

    // Always refresh the hidden variable as something else might have changed
    ctrl.hidden = shouldHide();
  }
Sets the loading parameter and updates the hidden state.
@param value {boolean} Whether or not the component is currently loading.