Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgTableEventsChannel

Strongly typed pub/sub for NgTableParams

Supported events:

  • afterCreated - raised when a new instance of NgTableParams has finished being constructed
  • afterReloadData - raised when the NgTableParams reload method has finished loading new data
  • datasetChanged - raised when ISettings dataset receives a new data array
  • pagesChanged - raised when a new pages array has been generated

Hierarchy

  • NgTableEventsChannel

Index

Constructors

constructor

Properties

Private $rootScope

$rootScope: ng1.IRootScopeService

Static $inject

$inject: Array<string> = ['$rootScope']

Methods

Private addTableParamsEvent

  • addTableParamsEvent(eventName: string, target: object): any

Private createEventSubscriptionFn

  • createEventSubscriptionFn(eventName: string): (Anonymous function)

Private createPublishEventFn

  • createPublishEventFn(eventName: string): (Anonymous function)

onAfterCreated

  • Subscribe to receive notification whenever a new NgTableParams instance has finished being constructed. Optionally supply an eventFilter to restrict which events that should trigger the listener to be called. Supply a scope to have angular automatically unregister the listener when the scope is destroyed.

    Parameters

    • listener: IAfterCreatedListener

      the function that will be called when the event fires

    • scope: IScope

      the angular $scope that will limit the lifetime of the event subscription

    • Optional eventFilter: IEventSelectorFunc

      a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

  • Subscribe to receive notification whenever a new NgTableParams instance has finished being constructed. Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Parameters

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

onAfterDataFiltered

  • Subscribe to receive notification whenever a ngTableDefaultGetData instance filters data Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IAfterDataFilteredListener<T>

      the function that will be called when the event fires

    • scope: IScope

      the angular $scope that will limit the lifetime of the event subscription

    • Optional eventFilter: EventSelector

      either the specific IDefaultGetData instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

  • Subscribe to receive notification whenever a ngTableDefaultGetData instance filters data Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IAfterDataFilteredListener<T>

      the function that will be called when the event fires

    • Optional eventFilter: EventSelector

      either the specific IDefaultGetData instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

onAfterDataSorted

  • Subscribe to receive notification whenever a ngTableDefaultGetData instance orders data Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IAfterDataSortedListener<T>

      the function that will be called when the event fires

    • scope: IScope

      the angular $scope that will limit the lifetime of the event subscription

    • Optional eventFilter: EventSelector

      either the specific IDefaultGetData instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

  • Subscribe to receive notification whenever a ngTableDefaultGetData instance orders data Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IAfterDataSortedListener<T>

      the function that will be called when the event fires

    • Optional eventFilter: EventSelector

      either the specific IDefaultGetData instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

onAfterReloadData

  • Subscribe to receive notification whenever the reload method of an NgTableParams instance has successfully executed Optionally supply an eventFilter to restrict which events that should trigger the listener to be called. Supply a scope to have angular automatically unregister the listener when the scope is destroyed.

    Type parameters

    • T

    Parameters

    • listener: IAfterReloadDataListener<T>

      the function that will be called when the event fires

    • scope: IScope

      the angular $scope that will limit the lifetime of the event subscription

    • Optional eventFilter: EventSelector

      either the specific NgTableParams instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

  • Subscribe to receive notification whenever the reload method of an NgTableParams instance has successfully executed Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IAfterReloadDataListener<T>

      the function that will be called when the event fires

    • Optional eventFilter: EventSelector

      a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

onDatasetChanged

  • Subscribe to receive notification whenever a new data rows array is supplied as a settings value to a NgTableParams instance. Optionally supply an eventFilter to restrict which events that should trigger the listener to be called. Supply a scope to have angular automatically unregister the listener when the scope is destroyed.

    Type parameters

    • T

    Parameters

    • listener: IDatasetChangedListener<T>

      the function that will be called when the event fires

    • scope: IScope

      the angular $scope that will limit the lifetime of the event subscription

    • Optional eventFilter: EventSelector

      either the specific NgTableParams instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

  • Subscribe to receive notification whenever a new data rows array is supplied as a settings value to a NgTableParams instance. Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IDatasetChangedListener<T>

      the function that will be called when the event fires

    • Optional eventFilter: EventSelector

      either the specific NgTableParams instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

onPagesChanged

  • Subscribe to receive notification whenever the paging buttons for an NgTableParams instance change Optionally supply an eventFilter to restrict which events that should trigger the listener to be called. Supply a scope to have angular automatically unregister the listener when the scope is destroyed.

    Type parameters

    • T

    Parameters

    • listener: IPagesChangedListener

      the function that will be called when the event fires

    • scope: IScope

      the angular $scope that will limit the lifetime of the event subscription

    • Optional eventFilter: EventSelector

      either the specific NgTableParams instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

  • Subscribe to receive notification whenever the paging buttons for an NgTableParams instance change Optionally supply an eventFilter to restrict which events that should trigger the listener to be called.

    Type parameters

    • T

    Parameters

    • listener: IPagesChangedListener

      the function that will be called when the event fires

    • Optional eventFilter: EventSelector

      either the specific NgTableParams instance you want to receive events for or a predicate function that should return true to receive the event

    Returns IUnregistrationFunc

    a unregistration function that when called will unregister the listener

publishAfterCreated

publishAfterDataFiltered

  • publishAfterDataFiltered<T>(publisher: NgTableParams<T>, newData: T[]): void

publishAfterDataSorted

  • publishAfterDataSorted<T>(params: NgTableParams<T>, newData: T[]): void

publishAfterReloadData

  • publishAfterReloadData<T>(publisher: NgTableParams<T>, newData: T[], oldData: T[]): void

publishDatasetChanged

  • publishDatasetChanged<T>(publisher: NgTableParams<T>, newDataset: T[], oldDataset: T[]): void

publishPagesChanged

Generated using TypeDoc