Installation

Our project will have the following structure:

  • Con NPM:
/
|   node_modules/
|   |   indigitall-web-inapp/
|   |   |   index.js
|   |   |   package.json
|   |   |   readme.md
|   |   |   inapp.min.js
|   |   |   /src
|   ..
  • Using local files:
/
|   indigitall-web-inapp/
|   |   inapp.min.js
|   ...

To initialize, you can go to Integration part: inApp integration

<!-- Replace this snippet with your appKey -->
<script
  src="/en/indigitall/inapp.min.js"
  onload="<<YOUR INAPP INITIALIZATION>>"
  async>
</script>

To use in Angular, you have to declare indigitall in a declaration file, for example typings.d.ts:

declare var indigitall:any;

And include the js file in angular.json under projects -> architect -> scripts

"scripts": [          
              "node_modules/indigitall-web-inapp/inapp.min.js"              
            ],