GithubHelp home page GithubHelp logo

NbMenuItem problem about nebular HOT 4 CLOSED

akveo avatar akveo commented on July 23, 2024
NbMenuItem problem

from nebular.

Comments (4)

YukiDmZhao avatar YukiDmZhao commented on July 23, 2024

ERROR TypeError: Cannot read property 'push' of undefined
at NbMenuComponent.webpackJsonp.../../../../@nebular/theme/components/menu/menu.component.js.NbMenuComponent.ngOnInit (menu.component.js:172)
at checkAndUpdateDirectiveInline (core.es5.js:10856)
at checkAndUpdateNodeInline (core.es5.js:12357)

from nebular.

YukiDmZhao avatar YukiDmZhao commented on July 23, 2024

menu,json
[
{
"title": "Dashboard",
"icon": "nb-home",
"link": "/pages/dashboard",
"home": true
},
{
"title": "FEATURES",
"group": true
},
{
"title": "UI Features",
"icon": "nb-keypad",
"link": "/pages/ui-features",
"children": [
{
"title": "Buttons",
"link": "/pages/ui-features/buttons"
},
{
"title": "Grid",
"link": "/pages/ui-features/grid"
},
{
"title": "Icons",
"link": "/pages/ui-features/icons"
},
{
"title": "Modals",
"link": "/pages/ui-features/modals"
}
]
},
{
"title": "Forms",
"icon": "nb-compose",
"children": [
{
"title": "Form Inputs",
"link": "/pages/forms/inputs"
},
{
"title": "Form Layouts",
"link": "/pages/forms/layouts"
}
]
}
]

this.httpService.get('assets/mocks/menu.json').then(result => {
this.menu =result;
});

error:
ERROR TypeError: Cannot read property 'push' of undefined
at NbMenuComponent.webpackJsonp.../../../../@nebular/theme/components/menu/menu.component.js.NbMenuComponent.ngOnInit (vendor.bundle.js:3555)
at checkAndUpdateDirectiveInline (vendor.bundle.js:81767)
at checkAndUpdateNodeInline (vendor.bundle.js:83268)
at checkAndUpdateNode (vendor.bundle.js:83207)
at debugCheckAndUpdateNode (vendor.bundle.js:84071)
at debugCheckDirectivesFn (vendor.bundle.js:84012)
at Object.eval [as updateDirectives] (ng:///PagesModule/PagesComponent.ngfactory.js:23)
at Object.debugUpdateDirectives [as updateDirectives] (vendor.bundle.js:83997)
at checkAndUpdateView (vendor.bundle.js:83174)
at callViewAction (vendor.bundle.js:83542)
View_PagesComponent_0 @ ng:///PagesModule/PagesComponent.ngfactory.js:12
11:17:05.066

from nebular.

YukiDmZhao avatar YukiDmZhao commented on July 23, 2024

menu;
menu0: NbMenuItem[] = [];

if use menu0: can not get menu, and error so up.
if use menu: can get menu, and error so up.

from nebular.

nnixaa avatar nnixaa commented on July 23, 2024

@YukiDmZhao please post more or less complete reproducible example with a concrete example of the issue with Nebular, as this looks like an issue with your code, and pretty hard to understand what you are trying to achieve. Thanks.

from nebular.

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.