Hi,
I am trying to implement PRIMENG TABLE in my angular app and am following the same steps as mentioned in https://primefaces.org/primeng/showcase/#/table/filter.
I have specified the TableModule in app.module file as well and have also included the provider in my component, but still I am getting this error. Could anyone help me out here as I have been stuck from last 7 hours in this issue.
Hope for quick response.
Thanks,
Vineet
Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[Table -> FilterService]:
-
- Posts: 1
- Joined: 23 Mar 2021, 23:21
I also got an error trying the modules : Dropdown, Listbox and TreTable. Error i got :
core.js:6014 ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[Dropdown -> FilterService]:
StaticInjectorError(Platform: core)[Dropdown -> FilterService]:
NullInjectorError: No provider for FilterService!
NullInjectorError: StaticInjectorError(AppModule)[Dropdown -> FilterService]:
StaticInjectorError(Platform: core)[Dropdown -> FilterService]:
NullInjectorError: No provider for FilterService!
core.js:6014 ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[Dropdown -> FilterService]:
StaticInjectorError(Platform: core)[Dropdown -> FilterService]:
NullInjectorError: No provider for FilterService!
NullInjectorError: StaticInjectorError(AppModule)[Dropdown -> FilterService]:
StaticInjectorError(Platform: core)[Dropdown -> FilterService]:
NullInjectorError: No provider for FilterService!
-
- Posts: 3
- Joined: 19 Apr 2021, 10:24
I am also getting the same error.
If you - vineetpa\BertOtte62 have identified a resolution plaese let me know here.
Thanks in advance.
My error
If you - vineetpa\BertOtte62 have identified a resolution plaese let me know here.
Thanks in advance.
My error
ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[Table -> FilterService]:
StaticInjectorError(Platform: core)[Table -> FilterService]:
NullInjectorError: No provider for FilterService!
NullInjectorError: StaticInjectorError(AppModule)[Table -> FilterService]:
StaticInjectorError(Platform: core)[Table -> FilterService]:
NullInjectorError: No provider for FilterService!
at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:725)
at resolveToken (core.js:11918)
at tryResolveToken (core.js:11862)
at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:11764)
at resolveToken (core.js:11918)
at tryResolveToken (core.js:11862)
at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:11764)
at resolveNgModuleDep (core.js:20234)
at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:20905)
at resolveDep (core.js:21276)
at resolvePromise (zone.js:852)
at resolvePromise (zone.js:809)
at zone.js:913
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:26247)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
at invokeTask (zone.js:1693)
-
- Posts: 3
- Joined: 19 Apr 2021, 10:24
I have resolved this by adding FilterService
and adding FilterService to the provider's listimport { FilterService } from 'primeng/api';
Hey, as you develop an Angular application you will need to continuously inform the app.module.ts that service, component, pipe, etc are available to the application.
Please also see my much more elaborate example of managing the complexities of app.module:
viewtopic.php?f=35&t=64955
Code: Select all
import { TableModule } from 'primeng/table';
import { FilterService } from 'primeng/api';
//
@NgModule({
declarations: [
AppComponent,
<other components>,
...
],
imports: [
CommonModule,
AppRoutingModule,
TableModule,
<other modules>,
...
],
providers: [
FilterService,
<other services>,
...
],
bootstrap: [AppComponent]
})
export class AppModule { }
viewtopic.php?f=35&t=64955
-
- Information
-
Who is online
Users browsing this forum: No registered users and 27 guests