Tag : primeng

I’m trying to figure out if it is possible in any way to pass a custom parameter to the overlayPanel of PrimeNg. It should look something like this: (notice the let-item param in the ng-template) <p-overlayPanel #op> <ng-template pTemplate let-item> <div (click)="this.delete(item.id)"> {{item.name}} </div> </ng-template> </p-overlayPanel> The reason I’m trying to do this is because ..

Read more

This is my MenuItem array: this.ButtonItems = [ {label: ‘Edit’, icon: ‘fa fa-pencil-alt’, command: (x) => { this.onEditDocument(x); }}, {label: ‘Duplicate’, icon: ‘pi pi-times’, command: (x) => { this.onDuplicate(x); }} ]; Both functions need a parameter of type string (item.id). Here is my template: <p-splitButton label="Save" icon="i-btn fa fa-search" title="View document" (onClick)="onViewDocument(item.id)" [model]="ButtonItems(item.id)"></p-splitButton> The code ..

Read more

I am trying to use the sample provide in here, but somehow I am not able to get it work with ng-templates. modified the stackblitz provided in example and tried but no luck. please help me to figure out what am I missing Below is my header code <p-menubar [model]="items"> <ng-template pTemplate="start"> <img src="assets/showcase/images/primeng.svg" height="40" ..

Read more

I place p-calendar into dynamic dialog. When I open calendar and then scoll calendar hides. I cannot apply appendTo=body because I want specify styles for this calendar. If I append it to body no styles will be applied. Sometimes calendar even hides immediately after I open it and then it opens normally after second clicking. ..

Read more

I am trying to use the following template with PrimeNG p-treetable in angular when data is loading. <ng-template pTemplate="loadingbody" let-columns="columns"> …my Awesome code </ng-template> My whole code looks like this: <p-treetable [loading]="true" …other attributes> <ng-template pTemplate="headers" let-columns="columns"> …code for headers </ng-template> <ng-template pTemplate="body" let-columns="columns"> …code for body </ng-template> <ng-template pTemplate="loadingbody" let-columns="columns"> …my Awesome code </ng-template> ..

Read more