Skip to main content

Charge Actions Modal

This section describes the ChargeActionsModalComponent component.

Usage

You must to import the ChargeActionsModalComponent and provide it to ModalService to open the modal.

info

Modals are not components. They must be used with the ModalService to be opened.

To a better understanding, check the Modals documentation.

charge-actions-modal.component.ts
import { ChargeActionsModalComponent } from '@celerofinancas/ui-charges';
import { ModalService } from "@celerofinancas/ui-modals";
import { Component, inject } from '@angular/core';

@Component({
standalone: true,
selector: 'charge-actions',
templateUrl: './charge-actions.component.html',
})
export class ChargeActionsComponent {
/**
* Modal service for handling modals
*/
private modalService = inject(ModalService);

/**
* Open the modal
*/
public openModal(): void {
this.modalService.open(ChargeActionsModalComponent, {
charge: charge,
onError: () => {
console.log('Error');
},
});
};
}

Inputs

The ChargeActionsModalComponent modalRef has the following inputs:

charge

Charge object to be displayed.

TypeDefault
Chargenull

Events

The ChargeActionsModalComponent modalRef has the following Events:

onError

Event triggered when an error occurs.

Type
() => {}