title: Using Javascript Library in Angular
body: <p>I am trying to use Cisco Webex browser SDK(<strong>ciscospark</strong>) with Angular 7.</p>
  
  <p>When I ran <code>ng serve</code> application complies successfully but in the browser console I get the below error</p>
  
  <blockquote>
    <p>Uncaught TypeError: Super expression must either be null or a function, not undefined</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/sc7N7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sc7N7.png" alt="enter image description here"></a></p>
  
  <p>Can anyone help me to solve this issue?</p>
  
  <p>Below is the link to the Cisco Webex browser SDK</p>
  
  <p><a href="https://developer.webex.com/docs/sdks/browser" rel="nofollow noreferrer">https://developer.webex.com/docs/sdks/browser</a></p>
  
  <p>I used <code>npm install --save ciscospark</code> to install the library to angular project. Below is my <strong>package.json</strong> file</p>
  
  <pre><code>{
    "name": "ng-webex-test",
    "version": "0.0.0",
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "~7.0.0",
      "@angular/common": "~7.0.0",
      "@angular/compiler": "~7.0.0",
      "@angular/core": "~7.0.0",
      "@angular/forms": "~7.0.0",
      "@angular/http": "~7.0.0",
      "@angular/platform-browser": "~7.0.0",
      "@angular/platform-browser-dynamic": "~7.0.0",
      "@angular/router": "~7.0.0",
      "ciscospark": "^1.32.23",
      "core-js": "^2.5.4",
      "rxjs": "~6.3.3",
      "stream": "0.0.2",
      "zone.js": "~0.8.26"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "~0.10.0",
      "@angular/cli": "~7.0.6",
      "@angular/compiler-cli": "~7.0.0",
      "@angular/language-service": "~7.0.0",
      "@types/node": "~8.9.4",
      "@types/jasmine": "~2.8.8",
      "@types/jasminewd2": "~2.0.3",
      "codelyzer": "~4.5.0",
      "jasmine-core": "~2.99.1",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~3.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.1",
      "karma-jasmine": "~1.1.2",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.4.0",
      "ts-node": "~7.0.0",
      "tslint": "~5.11.0",
      "typescript": "~3.1.6"
    }
  }
  </code></pre>
  
  <p>My <strong>app.component.ts</strong> file looks like below</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import * as ciscospark from 'ciscospark';
  // import { init as initTeams } from 'ciscospark';
  // import { CiscoSpark as ciscospark } from 'node_modules/@ciscospark/plugin-phone/dist/stats/filter.js';
  
  declare global {
    interface Window { webexteams: any; }
  }
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  
  export class AppComponent implements OnInit{
    title = 'ng-webex-test';
  
    ngOnInit() {
      const spark = ciscospark.init({
        credentials: {
          access_token: '*************************************'
        }
      });
  
      console.log(spark);
    }
  }
  </code></pre>