I was trying to implement the sample in the below url
http://www.primefaces.org/primeng/#/menubar
but getting the error on the line private items: MenuItem[]; as cannot find name 'MenuItem' even though i used import {MenuModule,MenuItem} from 'primeng/primeng'; in app.module.ts
I checked it locally but it seems to be working fine.
Hi, i have installed the primeng but i have the same issue shall i install it from another source?
You have to import MenuItem in the component where you are going to use it, you can't import it in app.module.ts because you can't include it in ngmodule imports
Thx for @igogu . It works. I tried like this:
I think that the tutorial http://www.primefaces.org/primeng/#/menubar should be fix.
The showcase documentation import doesn't mean only for app module .It mentioned as what specific modules and classes need to be imported(for both component.ts,module.ts) to work with the component.
Most helpful comment
You have to import MenuItem in the component where you are going to use it, you can't import it in app.module.ts because you can't include it in ngmodule imports