akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

When I tried to open a dialog, the following exception occurred. #3251

Open LetAmericaGreatAgain opened 7 months ago

LetAmericaGreatAgain commented 7 months ago

ERROR Error: [NbOverlayContainerAdapter]: Layout not found. When using Nebular '' is required and should wrap other nebular components. at throwLayoutNotFoundError (nebular-theme.mjs:1122:11) at NbOverlayContainerAdapter.checkContainer (nebular-theme.mjs:1149:13) at NbOverlayContainerAdapter._createContainer (nebular-theme.mjs:1141:14) at NbOverlayContainerAdapter.getContainerElement (overlay.mjs:754:18) at NbOverlay._createHostElement (overlay.mjs:2561:32) at NbOverlay.create (overlay.mjs:2528:27) at NbOverlayService.create (nebular-theme.mjs:1570:41) at NbDialogService.createOverlay (nebular-theme.mjs:19445:29) at NbDialogService.open (nebular-theme.mjs:19435:33)

roboter commented 1 month ago

"@nebular/theme": "^9.0.1",

When using Nebular '<nb-layout>' is required and should wrap other nebular components.

Layout have it and everything wrapped in it image

Fixed by adding .forRoot()

NbToastrModule.forRoot(),