1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Can not make a line break in confirmPopup message - primeNg

Discussão em 'Angular' iniciado por BOS, Outubro 10, 2024 às 12:13.

  1. BOS

    BOS Guest

    I am using primeNG v11 and I need to make a break line in my text message of the confirm popup. I've tried the \n and
    but doesn't work.

    My text message contains two phrases witch makes the popup too long.

    export class ConfirmPopupDemo {

    constructor(private confirmationService: ConfirmationService) {}

    confirm(event: Event) {
    this.confirmationService.confirm({
    target: event.target,
    message: 'phrase 1 \n phrase 2',
    icon: 'pi pi-exclamation-triangle',
    accept: () => {
    //confirm action
    },
    reject: () => {
    //reject action
    }
    });
    }
    }

    Continue reading...

Compartilhe esta Página