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!

image 1

<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”.

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

Share this post

Comment (1)

  • Karen Reply

    There is visibly a lot to know about this.
    I suppose you made various good points in features also.

    November 2, 2021 at 5:55 PM

Leave a Reply

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