Zecat / paper-stepper

Display progress through a sequence by breaking it up into multiple logical and numbered steps.
78 stars 20 forks source link

Problem in an angular2 app #53

Closed florent1933 closed 8 years ago

florent1933 commented 8 years ago

We would like to use it in an angular 2 app but with have this error :

EXCEPTION: TypeError: e.detail.item.open is not a function
main.bundle.js:55925 EXCEPTION: TypeError: e.detail.item.open is not a functionBrowserDomAdapter.logError @ main.bundle.js:55925
main.bundle.js:55925 STACKTRACE:BrowserDomAdapter.logError @ main.bundle.js:55925
main.bundle.js:55925 TypeError: e.detail.item.open is not a function
    at paper-stepper.openStep (http://localhost:4200/assets/vulcanized.html:24983:21)
    at paper-stepper.handler (http://localhost:4200/assets/vulcanized.html:3394:17)
    at ZoneDelegate.invokeTask (http://localhost:4200/main.bundle.js:101587:37)
    at Object.onInvokeTask (http://localhost:4200/main.bundle.js:53990:41)
    at ZoneDelegate.invokeTask (http://localhost:4200/main.bundle.js:101586:42)
    at Zone.runTask (http://localhost:4200/main.bundle.js:101487:47)
    at paper-stepper.ZoneTask.invoke (http://localhost:4200/main.bundle.js:101655:33)
    at paper-stepper.fire (http://localhost:4200/assets/vulcanized.html:4162:6)
    at paper-stepper._applySelection (http://localhost:4200/assets/vulcanized.html:20758:12)
    at Object.setItemSelected (http://localhost:4200/assets/vulcanized.html:20459:16)
    at Object.select (http://localhost:4200/assets/vulcanized.html:20477:14)
    at paper-stepper._selectSelected (http://localhost:4200/assets/vulcanized.html:20712:23)
    at paper-stepper._updateSelected (http://localhost:4200/assets/vulcanized.html:20708:12)
    at paper-stepper._complexObserverEffect (http://localhost:4200/assets/vulcanized.html:4491:4)
    at paper-stepper._effectEffects (http://localhost:4200/assets/vulcanized.html:4324:7)
    at paper-stepper._propertySetter (http://localhost:4200/assets/vulcanized.html:4308:6)
    at paper-stepper.setter (http://localhost:4200/assets/vulcanized.html:4387:6)
    at paper-stepper.attached (http://localhost:4200/assets/vulcanized.html:24971:21)
    at paper-stepper._invokeBehavior (http://localhost:4200/assets/vulcanized.html:458:4)
    at paper-stepper._doBehavior (http://localhost:4200/assets/vulcanized.html:448:6)
    at http://localhost:4200/assets/vulcanized.html:230:6
    at Object.whenReady (http://localhost:4200/assets/vulcanized.html:110:1)
    at paper-stepper.attachedCallback (http://localhost:4200/assets/vulcanized.html:228:22)
    at paper-stepper.attachedCallback (http://localhost:4200/assets/vulcanized.html:827:22)
    at BrowserDomAdapter.appendChild (http://localhost:4200/main.bundle.js:56018:108)
    at moveNodesAfterSibling (http://localhost:4200/main.bundle.js:25979:40)
    at DomRenderer.attachViewAfter (http://localhost:4200/main.bundle.js:25885:78)
    at DebugDomRenderer.attachViewAfter (http://localhost:4200/main.bundle.js:69315:24)
    at AppElement.attachView (http://localhost:4200/main.bundle.js:36352:27)
    at ViewContainerRef_.insert (http://localhost:4200/main.bundle.js:50110:23)
    at ViewContainerRef_.createEmbeddedView (http://localhost:4200/main.bundle.js:50090:14)
    at NgIf.set [as ngIf] (http://localhost:4200/main.bundle.js:41704:37)
    at DebugAppView._View_VenueDetailComponent0.detectChangesInternal (VenueDetailComponent.ngfactory.js:37:25)
    at DebugAppView.AppView.detectChanges (http://localhost:4200/main.bundle.js:70884:14)
    at DebugAppView.detectChanges (http://localhost:4200/main.bundle.js:70990:44)
    at DebugAppView.AppView.detectViewChildrenChanges (http://localhost:4200/main.bundle.js:70910:19)
    at DebugAppView._View_VenueDetailComponent_Host0.detectChangesInternal (VenueDetailComponent.ngfactory.js:31:8)
    at DebugAppView.AppView.detectChanges (http://localhost:4200/main.bundle.js:70884:14)
    at DebugAppView.detectChanges (http://localhost:4200/main.bundle.js:70990:44)
    at DebugAppView.AppView.detectContentChildrenChanges (http://localhost:4200/main.bundle.js:70902:19)
    at DebugAppView._View_AppComponent0.detectChangesInternal (AppComponent.ngfactory.js:89:8)
    at DebugAppView.AppView.detectChanges (http://localhost:4200/main.bundle.js:70884:14)
    at DebugAppView.detectChanges (http://localhost:4200/main.bundle.js:70990:44)
    at DebugAppView.AppView.detectViewChildrenChanges (http://localhost:4200/main.bundle.js:70910:19)
    at DebugAppView.AppView.detectChangesInternal (http://localhost:4200/main.bundle.js:70895:14)
    at DebugAppView.AppView.detectChanges (http://localhost:4200/main.bundle.js:70884:14)
    at DebugAppView.detectChanges (http://localhost:4200/main.bundle.js:70990:44)
    at ViewRef_.detectChanges (http://localhost:4200/main.bundle.js:50289:65)
    at http://localhost:4200/main.bundle.js:34363:84
    at Array.forEach (native)
    at ApplicationRef_.tick (http://localhost:4200/main.bundle.js:34363:38)
    at http://localhost:4200/main.bundle.js:34267:105
    at ZoneDelegate.invoke (http://localhost:4200/main.bundle.js:101554:28)
    at Object.onInvoke (http://localhost:4200/main.bundle.js:53999:41)
    at ZoneDelegate.invoke (http://localhost:4200/main.bundle.js:101553:34)
    at Zone.run (http://localhost:4200/main.bundle.js:101447:43)
    at NgZoneImpl.runInner (http://localhost:4200/main.bundle.js:54030:71)
    at NgZone.run (http://localhost:4200/main.bundle.js:37015:66)
    at Object.next (http://localhost:4200/main.bundle.js:34267:81)
    at SafeSubscriber.schedulerFn [as _next] (http://localhost:4200/main.bundle.js:36177:70)
    at SafeSubscriber.__tryOrUnsub (http://localhost:4200/main.bundle.js:504:16)
    at SafeSubscriber.next (http://localhost:4200/main.bundle.js:453:22)
    at Subscriber._next (http://localhost:4200/main.bundle.js:406:26)
    at Subscriber.next (http://localhost:4200/main.bundle.js:370:18)BrowserDomAdapter.logError @ main.bundle.js:55925
main.bundle.js:508 Uncaught TypeError: e.detail.item.open is not a function

For information, we use others components and they work, moreover we vulcanize all components.

Zecat commented 8 years ago

Sorry I'm not yet experienced with angular 2. Are you using https://github.com/vaadin/angular2-polymer ?

florent1933 commented 8 years ago

@Zecat : Thanks for your reply.

No, we don't use Vaadin.

I am going to dive into the code to find the problem.

florent1933 commented 8 years ago

Sorry, mistake comes from me, I imported two times paper-stepper instead of paper-step.

But I have other problems but it's an other issue.