qlik-demo-team / qdt-components

React Components to be used with Angular 10, React 16 and Vue 2. Connects with the Capability API and Engine API.
MIT License
92 stars 50 forks source link

Error when starting the application #2

Closed QuentinLeGoff closed 6 years ago

QuentinLeGoff commented 6 years ago

Hello,

I try to integrate your component into an Angular (5) application but I have the following issue:

webpack-internal:///../../../../../src/app/shared/components/qdt-component/qdt-component.component.ts:36 Uncaught TypeError: qdt_components_1.QdtComponents is not a constructor at eval (webpack-internal:///../../../../../src/app/shared/components/qdt-component/qdt-component.component.ts:36) at eval (webpack-internal:///../../../../../src/app/shared/components/qdt-component/qdt-component.component.ts:55) at Object.../../../../../src/app/shared/components/qdt-component/qdt-component.component.ts (main.bundle.js:149) at webpack_require (inline.bundle.js:55) at eval (webpack-internal:///../../../../../src/app/shared/shared.module.ts:38) at Object.../../../../../src/app/shared/shared.module.ts (main.bundle.js:541) at webpack_require (inline.bundle.js:55) at eval (webpack-internal:///../../../../../src/app/app.module.ts:22) at Object.../../../../../src/app/app.module.ts (main.bundle.js:51) at __webpack_require__ (inline.bundle.js:55)

Any idea ?

yianni-ververis commented 6 years ago

Hello,

The components have changed to version 1.1.1. Please use the latest.

This is the main qdt-components.component.ts in Angular 5 export class QdtComponentComponent implements OnInit {

@Input() Component: string;
@Input() props: object;

static QdtComponent = new QdtComponents(qConfig.config, qConfig.connections);

constructor(private elementRef: ElementRef) { }

ngOnInit() {
    QdtComponentComponent.QdtComponent.render(this.Component, this.props, this.elementRef.nativeElement);
}

}

and here are some examples with the latest version https://webapps.qlik.com/qdt-components/angular5/index.html