Exception Handling in Angular 10

Exception Handling in Angular 10

I am using Angular 10 and when I click to open Persons page I get “Nulljector error” and redirect me to the home page .

NullInjectorError: No provider for PersonServiceProxy!

<a ng-reflect-router-link="/app/main/phonebook" href="/app/main/phonebook">phonebook </a>

The solution :

Add your ServiceProxy to providers in “\angular\src\shared\service-proxies\service-proxy.module.ts”.

  1. Open service-proxy.module.ts file
  2. In @NgModule > providers > Add this Line “ApiServiceProxies.PersonServiceProxy” like this

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *