ErickRuano / angular-pivot

Angular wrapper for Nicolas Kruchten's Pivot Table
MIT License
15 stars 13 forks source link

TypeError: this.find(...).sortable is not a function - in angular.module / es6 #2

Closed alex-kowalczyk closed 7 years ago

alex-kowalczyk commented 7 years ago

angular-pivot just displays "An error occurred rendering the PivotTable UI.".
Top of stack (render call is iin angular-pivot.js):

TypeError: this.find(...).sortable is not a function
    at jQuery.fn.init.$.fn.pivotUI (eval at <anonymous> (desktop.a0dc97c….js:1493), <anonymous>:1630:40)
    at render (eval at <anonymous> (desktop.a0dc97c….js:1457), <anonymous>:18:25)

Seems jQueryUI is not loaded properly?

my module.js (ES6 style):

import * as jQuery from 'jquery';
import * as jqueryui from 'jquery-ui';
import pivottable from 'pivottable';
import AngularPivot from 'angular-pivot';
import { component }  from './component';
export const myModule = angular
    .module('myModule', ['angular-pivottable'])
    .component('myModule', component);

Any suggestions appreciated.

alex-kowalczyk commented 7 years ago

The issue is general for jqueryui - need to include it in webpack/babel config: resolve: { 'jquery-ui': path.resolve(nodeModulesPath, 'jquery-ui', 'ui') }