Creating the Angular Component
The minimal requirement for any Angular Component to be integrated in the Platform as a Custom Widget, is to implement GeneWidget interface.
/** * Copyright (c) 2019 DecisionBrain SAS. All Rights Reserved. * * Base and minimal interface a Platform Widget must implement to be integrable in custom views and dashboards. * * This interface does not define any method but is used to enforce component Type at module compilation time. */ export interface GeneWidget { }
For example; we can create a very simple component that will be integrable in the Platform Views and Dashboards, as follows:
/** * Copyright (c) DecisionBrain SAS. All Rights Reserved. * * This is a Platform Sample Widget */ @Component({ selector: 'sample-widget', templateUrl: './map-widget.component.html' }) export class SampleWidgetComponent implements GeneWidget { constructor() { } }