1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Can not make a line break in confirmPopup message - primeNg

Discussão em 'Angular' iniciado por BOS, Outubro 10, 2024.

  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