API

angular-gantt has an API to call methods of the component and listen or raise events.

Register the API Object using api attribute.

<div gantt api="registerApi"></div>
$scope.registerApi = function(api) {
  api.core.on.ready($scope, function () {
    // Call API methods and register events.
  });
}

API Object contains features, like api.core, api.data, api.rows or api.columns.

Each feature has attached methods, like api.data.load(data) or api.core.getDateByPosition(position).

On each feature, on object is used to register listeners, and raise object to fire events manually.

// Listen an event called 'eventName' of a feature called 'featureName'.
api.featureName.on.eventName($scope, function(data) {
    // Called when 'eventName' is raised.
});

// Raise an event called 'eventName' of a feature called 'featureName'.
api.featureName.raise.eventName(data);

// Call method called 'methodName' of a feature called 'featureName'.
api.featureName.methodName();

Events

core

data

directives

Directives events are entry points to build Template Hooks and Plugins.

tasks

timespans

rows

columns

side

scroll

Methods

core

data

timespans

columns

side

rows

timeframes

scroll