Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

sample code for using PrimeNg DataTable #355

Closed
@nklt

Description

@nklt

Hi

I like to find out if anyone can provide sample code to import and use DataTable from PrimeNg,

Based on Example code from https://github.com/aspnet/JavaScriptServices/commit/cff75c68933ebf6d2737a33f84dcb4076d1fd974, I attempt to follow http://www.primefaces.org/primeng/#/datatable to create a test component for DataTable.

For some reason, the typescript runtime (during dotnet run) complains that p_DataTable cannot be found in module, when clearly the entire PrimeNg node modules have been imported into WebPack.

The error message is:

fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
      An unhandled exception has occurred: Call to Node module failed with error: Error: Template parse errors:
Can't bind to 'value' since it isn't a known property of 'p-DataTable'.
1. If 'p-DataTable' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'p-DataTable' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to
suppress this message.
 (" load data from the server.</p>
      <p *ngIf="!cars"><em>Loading...</em>
          <p-DataTable [ERROR ->][value]="centers">
              <p-Column field="listype" header="Type"></p-Column>
              <p-Column fi"): DataTableDemo@3:17
'p-Column' is not a known element:
1. If 'p-Column' is an Angular component, then verify that it is part of this module.
2. If 'p-Column' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to sup
press this message. ("

where DataTableDemo is the export class, and cars is the public array property.

Can anyone tell me why other smaller components like button and ratings modules are loaded, but DataTable cannot?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions