Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
matthi0uw
Partner - Contributor II
Partner - Contributor II

Embed charts in angular5 app ?

Hi,

I tried to create graph in my existing app : is there a simple way to do that ?

I make some tests:

  • load requirejs from qlik server in index.html

 

<script src="https:/hostname/resources/assets/external/requirejs/require.js"></script>
  • in typescript component :

 

constructor(  ) {
    const config: {} = {
      host: 'domain',
      prefix: '/prefix/',
      port: '80',
      isSecure: window.location.protocol === 'https:',
    };
    try {
      window['require'].config( {
        baseUrl: 'path',
      } );
    } catch (error) {
      window['require'].config( {
        baseUrl: 'path',
      } );
    }
    window['require']( ['js/qlik'], (qlik: {}) => {
      const app: {} = qlik['openApp']('d09415d9-bc23-4910-8385-9aa00110dc84', config);
    } );
  }

In need to use try catch to avoid conflict from js scripts... 
I works, I have my app openned. But why must I do that ?

 

 

0 Replies