File

src/app/recipients/recipient-delete/recipient-delete.component.ts

Metadata

selector app-recipient-delete
styleUrls recipient-delete.component.css
templateUrl ./recipient-delete.component.html

Index

Methods
Inputs
Outputs

Inputs

template

Type: Template

Outputs

cancelDelete $event type: EventEmitter
deleteTemplate $event type: EventEmitter

Methods

cancel
cancel()
Returns : void
delete
delete()
Returns : void
stopPropagation
stopPropagation(event: Event)
Parameters :
Name Type Optional
event Event no
Returns : void
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Template } from '../../models';

@Component({
  selector: 'app-recipient-delete',
  templateUrl: './recipient-delete.component.html',
  styleUrls: ['./recipient-delete.component.css']
})
export class RecipientDeleteComponent {
  @Input() template: Template;
  @Output() cancelDelete = new EventEmitter();
  @Output() deleteTemplate = new EventEmitter();

  delete() {
    this.deleteTemplate.emit(this.template.id);
  }

  cancel() {
    this.cancelDelete.emit();
  }

  stopPropagation(event: Event) {
    event.stopPropagation();
  }
}
<div class="overlay scroller" (click)="cancel()">
  <div class="pop-up-ctn" id="deleteAccountConfirmation">

    <div class="close-ctn" (click)="stopPropagation($event)">
      <a id="closeButton" (click)="cancel()">
        <i class="material-icons">close</i>
      </a>
    </div>

    <div class="pop-up-ctn-header" (click)="stopPropagation($event)">
      <p class="header-text">{{template.name}}</p>
    </div>
    <div class="pop-up-ctn-body" (click)="stopPropagation($event)">

      <p id="areYouSureLabel">Are you sure you want to delete this recipient?</p>

      <p class="delete-options">
        <span class="delete-option">
          <a id="cancelDeleteButton" (click)="cancel()">Cancel</a>
        </span>
        <span class="delete-option">
          <a id="confirmDeleteButton" (click)="delete()">Delete Recipient</a>
        </span>
      </p>

    </div>
  </div>
</div>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""