We are trying to integrate a jQuery version of a control in an Angular 8 application. I tried initializing the component in ngAfterViewInit() but I'm getting an error. 
ngAfterViewInit() {
  jq("#PivotGrid").ejPivotGrid({
    dataSource: {
      data: this.data,
      rows: [{
        name: 'departmentName',
        caption: 'Department',
        showSubTotals: false
      }, {
        name: 'className',
        caption: 'Class',
        showSubTotals: false
      }, {
        name: 'metricName',
        caption: 'Metric'
      }],
      columns: [{
        name: 'year',
        caption: 'Year'
      }, {
        name: 'quarterDescription',
        caption: 'Quarter'
      }, {
        name: 'monthDescription',
        caption: 'Month'
      }, {
        name: 'weekDescription',
        caption: 'Week'
      }, {
        name: 'channel',
        caption: 'Channel'
      }, ],
      values: [{
        name: 'metricValue',
        caption: 'Metric Value'
      }, ]
    }
  });
}
Error is
TypeError: jquery__WEBPACK_IMPORTED_MODULE_2__(...).ejPivotGrid is not a function
Script section in angular.json
     "scripts": [
          "./node_modules/jquery/dist/jquery.min.js",
          "src/assets/scripts/ej.js"
        ]
 
     
    