Primeng: 'p-tabPanel' is not a known element

Created on 24 Apr 2018  路  7Comments  路  Source: primefaces/primeng

Hi,

Primeng not working in my project, I'm getting this error:
image

I'm in angular 5, primeng v5.2.4 and wepack

Could you please help to check this?

Most helpful comment

ERROR in src/app/info/info.component.html:3:11 - error NG8001: 'p-table' is not a known element:
1. If 'p-table' is an Angular component, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

3           <p-table [value]="books">
            ~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.
src/app/info/info.component.html:3:20 - error NG8002: Can't bind to 'value' since it isn't a known property of 'p-table'.
1. If 'p-table' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

3           <p-table [value]="books">
                     ~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.


ERROR in src/app/info/info.component.html:3:11 - error NG8001: 'p-table' is not a known element:
1. If 'p-table' is an Angular component, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

3           <p-table [value]="books">
            ~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.
src/app/info/info.component.html:3:20 - error NG8002: Can't bind to 'value' since it isn't a known property of 'p-table'.
1. If 'p-table' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

3           <p-table [value]="books">
                     ~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.

All 7 comments

You have to import the proper TabViewModule in the module where the component which uses tabPanel (SharedModule as we can see on your error).

As stated in the doc, TabViewModule contains both p-tabView and p-tabPanel components.

Hi @blackholegalaxy

I already imported TabViewModule in app.module but it's still not working

import { TabViewModule } from 'primeng/components/tabview/tabview';

image

Looks like you have to import it in SharedModule

Thanks @nartc very much! It's working now

my html file has below code :-



Header content here

Body Content

I have added imported required modules in my module from primeng :-

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { MyComponent } from './my.component';
import { CommonModule } from '@angular/common';
import { SharedModule, PanelModule } from 'primeng/primeng';

`

@NgModule({
imports: [
CommonModule, SharedModule, PanelModule
],
declarations: [MyComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA ]
})
export class ThemeModule { }
This is throwing below error in console :-

EXCEPTION: Uncaught (in promise): Error: Template parse errors: 'p-header' is not a known element: 1. If 'p-header' is an Angular component, then verify that it is part of this module. 2. If 'p-header' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("

showbox vidmate cartoonhds popcorn time mobdro terrarium tv videoder gbwhatsapp sad shayari

ERROR in src/app/info/info.component.html:3:11 - error NG8001: 'p-table' is not a known element:
1. If 'p-table' is an Angular component, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

3           <p-table [value]="books">
            ~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.
src/app/info/info.component.html:3:20 - error NG8002: Can't bind to 'value' since it isn't a known property of 'p-table'.
1. If 'p-table' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

3           <p-table [value]="books">
                     ~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.


ERROR in src/app/info/info.component.html:3:11 - error NG8001: 'p-table' is not a known element:
1. If 'p-table' is an Angular component, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

3           <p-table [value]="books">
            ~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.
src/app/info/info.component.html:3:20 - error NG8002: Can't bind to 'value' since it isn't a known property of 'p-table'.
1. If 'p-table' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

3           <p-table [value]="books">
                     ~~~~~~~~~~~~~~~

  src/app/info/info.component.ts:6:16
    6   templateUrl: './info.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InfoComponent.

Looks like you have to import it in SharedModule

@nartc - please explain this. unable to solve error for p-toolbar.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philly-vanilly picture philly-vanilly  路  3Comments

KannanMuruganmony picture KannanMuruganmony  路  3Comments

markgoho picture markgoho  路  3Comments

lilling picture lilling  路  3Comments

limjoonae picture limjoonae  路  3Comments