Giter VIP home page Giter VIP logo

Comments (8)

tiberiuzuld avatar tiberiuzuld commented on July 18, 2024

Hi @rajesh-kanakabandi ,
If is that complicated to upgrade to v4,
I will think about releasing a v2.4.5, and look at how complicate it is to do it, probably this week will do it.

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on July 18, 2024

Hi @rajesh-kanakabandi ,
Released a v2.4.5 for angular2 compatible with AOT.
I didn't tested it because my demo now works with Angularv4,
I only replaced Renderer2 with Renderer v1
Let me know if this works for you.

from angular-gridster2.

rajesh-kanakabandi avatar rajesh-kanakabandi commented on July 18, 2024

@tiberiuzuld thank you for the quick update. AOT build works but still I get the following error on the browser.

TypeError: element.addEventListener is not a function
    at DomEventsPlugin.addEventListener (https://mydomain.com/dashboard-app/vendor.bundle.js:81519:17)
    at EventManager.addEventListener (https://mydomain.com/dashboard-app/vendor.bundle.js:17627:23)
    at DomRenderer.listen (https://mydomain.com/dashboard-app/vendor.bundle.js:54271:48)
    at DebugDomRenderer.listen (https://mydomain.com/dashboard-app/vendor.bundle.js:100957:31)
    at GridsterComponent.ngOnInit (https://mydomain.com/dashboard-app/vendor.bundle.js:38319:43)
    at Wrapper_GridsterComponent.ngDoCheck (/GridsterModule/GridsterComponent/wrapper.ngfactory.js:34:53)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent0.detectChangesInternal (/AppModule/Gridster2dashComponent/component.ngfactory.js:172:31)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102610:14)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102805:44)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102595:18)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent_Host0.detectChangesInternal (/AppModule/Gridster2dashComponent/host.ngfactory.js:29:19)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102610:14)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102805:44)
    at ViewRef_.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:70422:20)
    at RouterOutlet.activate (https://mydomain.com/dashboard-app/vendor.bundle.js:82505:42)
ErrorHandler.handleError @ error_handler.js:54
next @ application_ref.js:348
schedulerFn @ async.js:93
SafeSubscriber.__tryOrUnsub @ Subscriber.js:234
SafeSubscriber.next @ Subscriber.js:183
Subscriber._next @ Subscriber.js:125
Subscriber.next @ Subscriber.js:89
Subject.next @ Subject.js:55
EventEmitter.emit @ async.js:79
NgZone.triggerError @ ng_zone.js:333
onHandleError @ ng_zone.js:294
ZoneDelegate.handleError @ zone.js:233
Zone.runGuarded @ zone.js:129
_loop_1 @ zone.js:416
drainMicroTaskQueue @ zone.js:425
ZoneTask.invoke @ zone.js:336
2017-04-10 16:32:12.348 error_handler.js:59 ORIGINAL STACKTRACE:
ErrorHandler.handleError @ error_handler.js:59
next @ application_ref.js:348
schedulerFn @ async.js:93
SafeSubscriber.__tryOrUnsub @ Subscriber.js:234
SafeSubscriber.next @ Subscriber.js:183
Subscriber._next @ Subscriber.js:125
Subscriber.next @ Subscriber.js:89
Subject.next @ Subject.js:55
EventEmitter.emit @ async.js:79
NgZone.triggerError @ ng_zone.js:333
onHandleError @ ng_zone.js:294
ZoneDelegate.handleError @ zone.js:233
Zone.runGuarded @ zone.js:129
_loop_1 @ zone.js:416
drainMicroTaskQueue @ zone.js:425
ZoneTask.invoke @ zone.js:336
2017-04-10 16:32:12.348 error_handler.js:60 Error: Uncaught (in promise): Error: Error in ./Gridster2dashComponent class Gridster2dashComponent - inline template:4:10 caused by: element.addEventListener is not a function
TypeError: element.addEventListener is not a function
    at DomEventsPlugin.addEventListener (dom_events.js:32)
    at EventManager.addEventListener (event_manager.js:37)
    at DomRenderer.listen (dom_renderer.js:302)
    at DebugDomRenderer.listen (debug_renderer.js:153)
    at GridsterComponent.ngOnInit (gridster.component.js:31)
    at Wrapper_GridsterComponent.ngDoCheck (/GridsterModule/GridsterComponent/wrapper.ngfactory.js:34)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent0.detectChangesInternal (/AppModule/Gridster2dashComponent/component.ngfactory.js:172)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (view.js:410)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent_Host0.detectChangesInternal (/AppModule/Gridster2dashComponent/host.ngfactory.js:29)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
    at ViewRef_.detectChanges (view_ref.js:170)
    at RouterOutlet.activate (router_outlet.js:156)
    at resolvePromise (zone.js:475) [angular]
    at resolvePromise (zone.js:460) [angular]
    at /dashboard-app/vendor.bundle.js:168890:17 [angular]
    at Object.onInvokeTask (ng_zone.js:264) [angular]
    at ZoneDelegate.invokeTask (zone.js:261) [angular]
    at Zone.runTask (zone.js:151) [<root> => angular]
    at drainMicroTaskQueue (zone.js:405) [<root>]
    at HTMLAnchorElement.ZoneTask.invoke (zone.js:336) [<root>]
ErrorHandler.handleError @ error_handler.js:60
next @ application_ref.js:348
schedulerFn @ async.js:93
SafeSubscriber.__tryOrUnsub @ Subscriber.js:234
SafeSubscriber.next @ Subscriber.js:183
Subscriber._next @ Subscriber.js:125
Subscriber.next @ Subscriber.js:89
Subject.next @ Subject.js:55
EventEmitter.emit @ async.js:79
NgZone.triggerError @ ng_zone.js:333
onHandleError @ ng_zone.js:294
ZoneDelegate.handleError @ zone.js:233
Zone.runGuarded @ zone.js:129
_loop_1 @ zone.js:416
drainMicroTaskQueue @ zone.js:425
ZoneTask.invoke @ zone.js:336
2017-04-10 16:32:12.348 zone.js:392 Unhandled Promise rejection: Error in ./Gridster2dashComponent class Gridster2dashComponent - inline template:4:10 caused by: element.addEventListener is not a function ; Zone: angular ; Task: Promise.then ; Value: ViewWrappedError {_nativeError: Error: Error in ./Gridster2dashComponent class Gridster2dashComponent - inline template:4:10 caused …, originalError: TypeError: element.addEventListener is not a function
    at DomEventsPlugin.addEventListener (https…, context: DebugContext} TypeError: element.addEventListener is not a function
    at DomEventsPlugin.addEventListener (https://mydomain.com/dashboard-app/vendor.bundle.js:81519:17)
    at EventManager.addEventListener (https://mydomain.com/dashboard-app/vendor.bundle.js:17627:23)
    at DomRenderer.listen (https://mydomain.com/dashboard-app/vendor.bundle.js:54271:48)
    at DebugDomRenderer.listen (https://mydomain.com/dashboard-app/vendor.bundle.js:100957:31)
    at GridsterComponent.ngOnInit (https://mydomain.com/dashboard-app/vendor.bundle.js:38319:43)
    at Wrapper_GridsterComponent.ngDoCheck (/GridsterModule/GridsterComponent/wrapper.ngfactory.js:34:53)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent0.detectChangesInternal (/AppModule/Gridster2dashComponent/component.ngfactory.js:172:31)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102610:14)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102805:44)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102595:18)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent_Host0.detectChangesInternal (/AppModule/Gridster2dashComponent/host.ngfactory.js:29:19)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102610:14)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:102805:44)
    at ViewRef_.detectChanges (https://mydomain.com/dashboard-app/vendor.bundle.js:70422:20)
    at RouterOutlet.activate (https://mydomain.com/dashboard-app/vendor.bundle.js:82505:42)
consoleError @ zone.js:392
_loop_1 @ zone.js:421
drainMicroTaskQueue @ zone.js:425
ZoneTask.invoke @ zone.js:336
2017-04-10 16:32:12.350 zone.js:394 Error: Uncaught (in promise): Error: Error in ./Gridster2dashComponent class Gridster2dashComponent - inline template:4:10 caused by: element.addEventListener is not a function
TypeError: element.addEventListener is not a function
    at DomEventsPlugin.addEventListener (dom_events.js:32)
    at EventManager.addEventListener (event_manager.js:37)
    at DomRenderer.listen (dom_renderer.js:302)
    at DebugDomRenderer.listen (debug_renderer.js:153)
    at GridsterComponent.ngOnInit (gridster.component.js:31)
    at Wrapper_GridsterComponent.ngDoCheck (/GridsterModule/GridsterComponent/wrapper.ngfactory.js:34)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent0.detectChangesInternal (/AppModule/Gridster2dashComponent/component.ngfactory.js:172)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (view.js:410)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent_Host0.detectChangesInternal (/AppModule/Gridster2dashComponent/host.ngfactory.js:29)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
    at ViewRef_.detectChanges (view_ref.js:170)
    at RouterOutlet.activate (router_outlet.js:156)
    at DomEventsPlugin.addEventListener (dom_events.js:32)
    at EventManager.addEventListener (event_manager.js:37)
    at DomRenderer.listen (dom_renderer.js:302)
    at DebugDomRenderer.listen (debug_renderer.js:153)
    at GridsterComponent.ngOnInit (gridster.component.js:31)
    at Wrapper_GridsterComponent.ngDoCheck (/GridsterModule/GridsterComponent/wrapper.ngfactory.js:34)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent0.detectChangesInternal (/AppModule/Gridster2dashComponent/component.ngfactory.js:172)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (view.js:410)
    at CompiledTemplate.proxyViewClass.View_Gridster2dashComponent_Host0.detectChangesInternal (/AppModule/Gridster2dashComponent/host.ngfactory.js:29)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (view.js:425)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (view.js:620)
    at ViewRef_.detectChanges (view_ref.js:170)
    at RouterOutlet.activate (router_outlet.js:156)
    at resolvePromise (zone.js:475) [angular]
    at resolvePromise (zone.js:460) [angular]
    at /dashboard-app/vendor.bundle.js:168890:17 [angular]
    at Object.onInvokeTask (ng_zone.js:264) [angular]
    at ZoneDelegate.invokeTask (zone.js:261) [angular]
    at Zone.runTask (zone.js:151) [<root> => angular]
    at drainMicroTaskQueue (zone.js:405) [<root>]
    at HTMLAnchorElement.ZoneTask.invoke (zone.js:336) [<root>]```

thank you,
--Rajesh

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on July 18, 2024

ok try v2.4.6,
replaced the listen on renderer with listenGlobal

from angular-gridster2.

rajesh-kanakabandi avatar rajesh-kanakabandi commented on July 18, 2024

@tiberiuzuld works fine now.
although just FYI, I had to make change to the 'item' input on gridster-item.
my input previously was

{
       id: this.dashboard.length, cols: 2, rows: 1, y: 0, x: 0 ,
       payload: payloadObj
}

this was resulting in

TypeError: Cannot set property 'type' of undefined
    at Function.GridsterUtils.merge 

however moving the payload out of the input for 'item' on gridster-item has successfully worked.

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on July 18, 2024

@rajesh-kanakabandi hmm... yes I should take the options I care about only.
Will make a fix this week.

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on July 18, 2024

@rajesh-kanakabandi made a fix in v2.4.8 try it out.

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on July 18, 2024

Closing since I assume the issues are resolved.

from angular-gridster2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.