After working with Angular for just three days, I successfully set up a login page dashboard using a web API solution. Everything was working great until I encountered an issue when trying to load the PrimeNG DataTableModule into my components. After searching for solutions online, I discovered that the error "Can't bind to 'value' since it isn't a known property of 'p-dataTable'" could be caused by two things: the module not being defined in app.module.ts or the property not existing.
My first question: Why is my app.module.ts split into three separate files (app.module.client.ts, app.module.server.ts, and app.module.shared.ts) in my solution?
My Second Question: When adding the DataTableModule to the app.module.client.ts file, I receive the error mentioned above. However, if I add it to the shared or server module files, a different error occurs stating, "Prerendering failed because of error: ReferenceError: Event is not defined." What am I doing wrong?
Here is the code:
app.module.client.ts
...
app.module.server.ts
...
app.module.shared.ts
...
Page where I am trying to implement the datagrid user.component.html
...
user.component.ts
...
Error message with Module defined in the app.module.client.ts file
Exception: 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.schemas' of this component to suppress this message.
Error message with Module defined in either the app.module.server.ts or app.module.shared.ts file
Exception: Call to Node module failed with error: Prerendering failed because of error: ReferenceError: Event is not defined main-server.js:50676:38)