Using enigma.js in extensions

You are also able to leverage enigma when building extensions utilizing the Extension API. By default, when you are building an AngularJS-based extension, as opposed to a paint-based one, enigma.js is shipped within the $scope of the extension:

// Enigma until 3.2.2
$scope.component.model.enigmaModel;
// Enigma from 3.2.3
$scope.component.model;

Using enigma.js, you can access the App API and perform similar methods to the Capability API, such as getting an object and its properties:

scope.enigmaModel.app.getObject('HXasde1').then(function (obj) {
return obj.getProperties()
}

Full documentation of enigma.js can be found on their GitHub account at https://github.com/qlik-oss/enigma.js/blob/master/docs/api.md#api-documentation.

As it's an open source project, and subject to continuous delivery by the community via pull requests, it's highly recommended to visit their official repository to ensure the latest version and documentation is utilized.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.86.183