CustomComponentAPI

v1.0.0

Custom components are small, self-contained elements of code that can be used and re-used when building widgets. Custom components contains the following elements: definition (QEXT) file, main JavaScript file and optional assets such as JavaScript libraries, images, and fonts.


Definition (QEXT) file:
```json
{
  "name": "ccs-hello-world",
  "description": "Hello world component for widgets",
  "type": "component",
  "version": "0.1.0",
  "author": "Qlik"
}

Main JavaScript file:

define( [], function () {
  return {
    componentName: "ccsHelloWorld",
    restrict: 'E',
    link: function ( scope, element, attrs ) {
      element.html( 'Hello world.' );
    }
  };
});

Usage:

<ccs-hello-world></ccs-hello-world>

component

interface

Properties

componentName
string

The name of the component

restrict
string

No description

link

No description

qext

interface

Properties

name
string

The name of the custom component.

description
string

Provides a meaningful description of your custom component.

type
string

Extension type. Should always be 'component' for custom components.

version
string

Version of your custom component. Uses the semantic version concept.

author
optional
string

Author of the custom component.