I started working on AspNetBoilerplate with AngularJS frontend and I was getting error as ERROR Error: Uncaught (in promise): Error: StaticInjectorError(RootModule)[QuestionsComponent -> QuestionServiceProxy]:
StaticInjectorError(Platform: core)[QuestionsComponent -> QuestionServiceProxy]:
NullInjectorError: No provider for QuestionServiceProxy!.
I searched over the internet about possible fixes and everyone was saying that you need to import the component which was already imported as
import { QuestionServiceProxy, QuestionDto, PagedResultDtoOfQuestionDto } from '@shared/service-proxies/service-proxies';
The service-proxies also had QuestionServiceProxy which made it ver confusing that why I was getting the error. What I missed is the service.proxy.module.ts where I need to also include it using @NgModule as shown below :
Thus it fixed the issue. Please like and share the CodingDefined.com blog if you find it useful and helpful.
StaticInjectorError(Platform: core)[QuestionsComponent -> QuestionServiceProxy]:
NullInjectorError: No provider for QuestionServiceProxy!.
I searched over the internet about possible fixes and everyone was saying that you need to import the component which was already imported as
import { QuestionServiceProxy, QuestionDto, PagedResultDtoOfQuestionDto } from '@shared/service-proxies/service-proxies';
The service-proxies also had QuestionServiceProxy which made it ver confusing that why I was getting the error. What I missed is the service.proxy.module.ts where I need to also include it using @NgModule as shown below :
@NgModule({ providers: [ ApiServiceProxies.RoleServiceProxy, ApiServiceProxies.SessionServiceProxy, ApiServiceProxies.TenantServiceProxy, ApiServiceProxies.UserServiceProxy, ApiServiceProxies.QuestionServiceProxy, ApiServiceProxies.TokenAuthServiceProxy, ApiServiceProxies.AccountServiceProxy, ApiServiceProxies.ConfigurationServiceProxy, { provide: HTTP_INTERCEPTORS, useClass: AbpHttpInterceptor, multi: true } ] }) export class ServiceProxyModule { }
Thus it fixed the issue. Please like and share the CodingDefined.com blog if you find it useful and helpful.
Related articles
- How to create Simple Twitter Bot in Node.js
- Legacy Browser Support for using Babel
- Getting Started with Node.js Koa 2 Framework
- Web Scraping Libraries for Node.js Developers
- How to Create Simple RSS Reader in Ionic Application
- Simple RESTful API in Nodejs
- How to Get Latest Tweets of a particular HashTag using Nodejs
- How to Intercept HTTP requests in Node.js
- Node for Android
- Capture Screen of Web Pages through URL in Nodejs
No comments:
Post a Comment