lukasz-galka / ngx-gallery

Angular image gallery plugin
https://lukasz-galka.github.io/ngx-gallery-demo/
MIT License
436 stars 171 forks source link

TypeError: "class constructors must be invoked with 'new'" #271

Open msliman opened 5 years ago

msliman commented 5 years ago

CustomHammerConfig ngx-gallery.umd.js:1898 Angular 32 _createClass _createProviderInstance resolveNgModuleDep _callFactory _createProviderInstance resolveNgModuleDep _createClass _createProviderInstance resolveNgModuleDep _createClass _createProviderInstance resolveNgModuleDep _createProviderInstance resolveNgModuleDep get debugCreateRootView create create bootstrap _moduleDoBootstrap _moduleDoBootstrap bootstrapModuleFactory invoke onInvoke invoke run scheduleResolveOrReject invokeTask onInvokeTask invokeTask runTask drainMicroTaskQueue main.ts:12:24

theorye commented 5 years ago

https://github.com/lukasz-galka/ngx-gallery/issues/242

msliman commented 5 years ago

@theorye, Thank you I found this solution already and tried this suggested by oussail A temporary fix that works 💯 for now : in the file ngx-gallery.umd.js changes this lines of code :

var CustomHammerConfig = /* @Class / (function (_super) { __extends(CustomHammerConfig, _super); function CustomHammerConfig() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.overrides = ({ 'pinch': { enable: false }, 'rotate': { enable: false } }); return _this; } return CustomHammerConfig; }(platformBrowser.HammerGestureConfig));

to :

class CustomHammerConfig extends platformBrowser.HammerGestureConfig { constructor() { super(...arguments); this.overrides = ({ 'pinch': { enable: false }, 'rotate': { enable: false } }); } }

But I got this error: url is undefined in ngx-gallery.umd.js:159

theorye commented 5 years ago

Did my solution not work for you either?

msliman commented 5 years ago

I tried your solution and didn't work.