title: How to resolve Angular 10 primeng NullInjectorError: No provider for ConfirmationService?
body: <p>I am using primeng confirmDialog which required the confirmationService in my Angular 10 project but nothing is shown at localhost:4200 and  I got the following error in Chrome console.</p>
  <pre><code>ERROR NullInjectorError: R3InjectorError(AppModule)[ConfirmationService -&gt; ConfirmationService -&gt; ConfirmationService]: 
  NullInjectorError: No provider for ConfirmationService!
    at NullInjector.get (http://localhost:4200/vendor.js:27059:27)
    at R3Injector.get (http://localhost:4200/vendor.js:37225:33)
    at R3Injector.get (http://localhost:4200/vendor.js:37225:33)
    at R3Injector.get (http://localhost:4200/vendor.js:37225:33)
    at NgModuleRef$1.get (http://localhost:4200/vendor.js:50342:33)
    at Object.get (http://localhost:4200/vendor.js:48245:35)
    at getOrCreateInjectable (http://localhost:4200/vendor.js:30065:39)
    at Module.ɵɵdirectiveInject (http://localhost:4200/vendor.js:39896:12)
    at NodeInjectorFactory.AppComponent_Factory [as factory] (http://localhost:4200/main.js:158:150)
    at getNodeInjectable (http://localhost:4200/vendor.js:30173:44)
  </code></pre>
  <p>Here is my app.component.ts.</p>
  <pre><code>import { Component } from '@angular/core';
  import { ConfirmationService } from 'primeng/api';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  
  })
  export class AppComponent {
    title = 'angular-tuts';
  
    constructor(private confirmationService: ConfirmationService) { }
  
    confirm() {
      this.confirmationService.confirm({
        message: 'Are you sure that you want to perform this action?',
        accept: () =&gt; {
  
        }
      });
    }
  
  }
  </code></pre>
  <p>Here is the app.component.html</p>
  <pre><code>&lt;p-confirmDialog header=&quot;Confirmation&quot; icon=&quot;pi pi-exclamation-triangle&quot;&gt;&lt;/p-confirmDialog&gt;
  
  &lt;button type=&quot;text&quot; (click)=&quot;confirm()&quot; pButton icon=&quot;pi pi-check&quot; label=&quot;Confirm&quot;&gt;&lt;/button&gt;
  </code></pre>
  <p>Thanks</p>