akveo/ngx-admin

[nbContextMenu] stopped working

Open

#1.791 aberto em 24 de jul. de 2018

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (7.916 forks)batch import
help wantedneeds info

Métricas do repositório

Stars
 (24.990 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request
  • question about the decisions made in the repository

Issue description

Current behavior: I had to change template of NbMenuItem. To do this, I downloaded menu component sources from Nebulars github. Then I modified paths in imports to include new one.

Now clicking on [nbContextMenu] element throws an error (context menu is not opening):

NbPopoverComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property 'instance' of null
    at NbPopoverComponent.set [as componentOutlet] (popover.component.js:35)
    at checkAndUpdateQuery (core.js:12847)
    at execQueriesAction (core.js:14207)
    at checkAndUpdateView (core.js:13809)
    at callViewAction (core.js:14153)
    at execComponentViewsAction (core.js:14085)
    at checkAndUpdateView (core.js:13808)
    at callViewAction (core.js:14153)
    at execEmbeddedViewsAction (core.js:14111)
    at checkAndUpdateView (core.js:13803)
View_NbPopoverComponent_Host_0 @ NbPopoverComponent_Host.ngfactory.js? [sm]:1
proxyClass @ compiler.js:14653
DebugContext_.logError @ core.js:14996
ErrorHandler.handleError @ core.js:1509
(anonymous) @ core.js:5914
ZoneDelegate.invoke @ zone.js:392
Zone.run @ zone.js:142
NgZone.runOutsideAngular @ core.js:4697
ApplicationRef.tick @ core.js:5914
(anonymous) @ core.js:5740
ZoneDelegate.invoke @ zone.js:392
onInvoke @ core.js:4749
ZoneDelegate.invoke @ zone.js:391
Zone.run @ zone.js:142
NgZone.run @ core.js:4566
next @ core.js:5740
schedulerFn @ core.js:4331
SafeSubscriber.__tryOrUnsub @ Subscriber.js:239
SafeSubscriber.next @ Subscriber.js:186
Subscriber._next @ Subscriber.js:127
Subscriber.next @ Subscriber.js:91
Subject.next @ Subject.js:56
EventEmitter.emit @ core.js:4311
checkStable @ core.js:4714
onLeave @ core.js:4793
onInvokeTask @ core.js:4743
ZoneDelegate.invokeTask @ zone.js:424
Zone.runTask @ zone.js:192
ZoneTask.invokeTask @ zone.js:499
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566

NbPopoverComponent_Host.ngfactory.js? [sm]:1 ERROR CONTEXT DebugContext_ {view: {…}, nodeIndex: 0, nodeDef: {…}, elDef: {…}, elView: {…}}
View_NbPopoverComponent_Host_0 @ NbPopoverComponent_Host.ngfactory.js? [sm]:1
proxyClass @ compiler.js:14653
DebugContext_.logError @ core.js:14996
ErrorHandler.handleError @ core.js:1514
(anonymous) @ core.js:5914
ZoneDelegate.invoke @ zone.js:392
Zone.run @ zone.js:142
NgZone.runOutsideAngular @ core.js:4697
ApplicationRef.tick @ core.js:5914
(anonymous) @ core.js:5740
ZoneDelegate.invoke @ zone.js:392
onInvoke @ core.js:4749
ZoneDelegate.invoke @ zone.js:391
Zone.run @ zone.js:142
NgZone.run @ core.js:4566
next @ core.js:5740
schedulerFn @ core.js:4331
SafeSubscriber.__tryOrUnsub @ Subscriber.js:239
SafeSubscriber.next @ Subscriber.js:186
Subscriber._next @ Subscriber.js:127
Subscriber.next @ Subscriber.js:91
Subject.next @ Subject.js:56
EventEmitter.emit @ core.js:4311
checkStable @ core.js:4714
onLeave @ core.js:4793
onInvokeTask @ core.js:4743
ZoneDelegate.invokeTask @ zone.js:424
Zone.runTask @ zone.js:192
ZoneTask.invokeTask @ zone.js:499
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566

NbContextMenuComponent.html:1 ERROR Error: StaticInjectorError(AppModule)[NbMenuComponent -> NbMenuInternalService]: 
  StaticInjectorError(Platform: core)[NbMenuComponent -> NbMenuInternalService]: 
    NullInjectorError: No provider for NbMenuInternalService!
    at _NullInjector.get (core.js:1002)
    at resolveToken (core.js:1300)
    at tryResolveToken (core.js:1242)
    at StaticInjector.get (core.js:1110)
    at resolveToken (core.js:1300)
    at tryResolveToken (core.js:1242)
    at StaticInjector.get (core.js:1110)
    at resolveNgModuleDep (core.js:10854)
    at NgModuleRef_.get (core.js:12087)
    at resolveNgModuleDep (core.js:10854)
View_NbContextMenuComponent_0 @ NbContextMenuComponent.html:1
proxyClass @ compiler.js:14653
DebugContext_.logError @ core.js:14996
ErrorHandler.handleError @ core.js:1509
next @ core.js:5497
schedulerFn @ core.js:4331
SafeSubscriber.__tryOrUnsub @ Subscriber.js:239
SafeSubscriber.next @ Subscriber.js:186
Subscriber._next @ Subscriber.js:127
Subscriber.next @ Subscriber.js:91
Subject.next @ Subject.js:56
EventEmitter.emit @ core.js:4311
(anonymous) @ core.js:4771
ZoneDelegate.invoke @ zone.js:392
Zone.run @ zone.js:142
NgZone.runOutsideAngular @ core.js:4697
onHandleError @ core.js:4771
ZoneDelegate.handleError @ zone.js:396
Zone.runTask @ zone.js:195
ZoneTask.invokeTask @ zone.js:499
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566
NbContextMenuComponent.html:1 ERROR CONTEXT DebugContext_ {view: {…}, nodeIndex: 1, nodeDef: {…}, elDef: {…}, elView: {…}}

Importing forRoot in app.module doesn't fix this: https://github.com/akveo/ngx-admin/issues/1641

Other information:

npm, node, OS, Browser

Node: v8.11.3
npm: 5.6.0
OS: macOS High Sierra
Browser: Chrome

Angular, Nebular

Angular: 5.2.6
Nebular:2.0.0-rc.7

Guia do colaborador