title: primeng confirmation service
body: <p>I have a component which uses confirmation service, as follows </p>
  
  <pre><code>@Component({
      moduleId: module.id,
      templateUrl: 'account-list.component.html',
      providers: [AccountService],
      selector: 'account-list'
  }).....
  
  deleteAccount(Account: Account) {
      this.confirmationService.confirm({
          header: 'Delete Confirmation', message: 'Are you sure that you want to delete this account?',
          icon: 'fa fa-trash',
          accept: () =&gt; {
              this.AccountService.deleteAccount(Account.account_id).subscribe(
                  res =&gt; {
                      let index: number = this.Accounts.findIndex(n =&gt; n.account_id === Account.mc_account_id);
                      if (~index) {
                          this.Accounts.splice(index, 1);
                      }
                      this.msgs.push({ severity: 'Info', summary: 'The account is deleted' });
                  },
                  err =&gt; {
                      this.msgs.push({ severity: 'Error', summary: err.message });
                  }
              );
  
          }
      });
  }
  </code></pre>
  
  <p>This component works fine as stand alone. When using this component as a child component, the confirmation service is triggered two times. I.e. when I would like to delete an object i need to click more than one time the accept or reject button. </p>
  
  <p>I use this component in rowexpantion in data table component as follows:</p>
  
  <pre><code>&lt;template let-parent pTemplate="rowexpansion"&gt;
          &lt;div class="outer" *ngIf="parent"&gt;
              &lt;div class="inner"&gt;
                  &lt;account-list [parentId]="parent.parent_id"&gt; &lt;/account-list&gt;
  
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/template&gt; 
  </code></pre>
  
  <p>In this example my component is used to show the accounts details for a Datatable  for the parent component, each time I expand a row of the parent table, then I need to click one more time the accept or reject buttons. 
  Regards</p>