primeng

Angular 2 Nested Modal Dialog with PrimeNG doesn't work

自古美人都是妖i 提交于 2019-11-29 14:52:32
I am using the PrimeNG dialog component and I have a modal dialog from which, on the click of a button, I want to show another modal dialog. What is happening is that my second modal dialog is not really modal, because I only see the content of the dialog following the button. I do change [appendTo] attribute of the p-dialog for the second modal dialog but it does not seem to work properly. How can I open nested dialog in a p-dialog? Dialog in a angular 2 component: <p-dialog header="Create/Edit Financial Flow" [visible]="display$ | async" modal="modal" width="500" height="600" responsive=

PrimeNG manually invoke FileUpload

假如想象 提交于 2019-11-29 13:55:05
I want to select the files first and then to start upload those files by an another button instead of component's own Upload button. How can I do this? Example code what I've tried: <button pButton type="button" label="Start Upload" (click)="startUpload()"></button> <p-fileUpload #fileInput name="fileIcon" url="rest/batch/file/multimedia/"></p-fileUpload> @ViewChild('fileInput') fileInput:ElementRef; constructor( private renderer: Renderer ) { } startUpload(){ // this.fileInput.upload(); -> doesn't compile, undefined // this.fileInput.nativeElement.upload(); -> this.fileInput.nativeElement is

How to set default value for PrimeNG p-dropdown

為{幸葍}努か 提交于 2019-11-28 12:06:14
I am using PrimeNG in my angular5 app. I have issue with p-dropdown Question I have p-dropdown for showing countries. I bind the select options correctly there it works fine (this data coming from api), but I need to set default selected option for this p-dropdown as "India". I set up ng-model value as India but it didn't work. my dummy.component.html code <div class="form-group col-md-2"> <div> <label for="inputEmail4"> Select Country</label> <span style="color:red">*</span> </div> <p-dropdown name="country" [options]="countries" [(ngModel)]="applicant.country" placeholder="select country"

Steps to integrate PrimeNG with JHipster

末鹿安然 提交于 2019-11-28 09:15:36
We have been trying to incorporate PrimeNG components into a JHipster (angular 4) generated project with no success. After download and install PrimeNG into our project, we are able to import classes but when we include the corresponding tags into templates nothing is drawn. We have tested several of the PrimeNG components. Also we have done the imports in app.module, etc. I would like to be more concrete, but no error is displayed anywhere. Do you have any hint on how work with PrimeNG and JHipster together? Thanks cjmm The following steps worked for us. 1- Add dependecies with yarn yarn add

What is let-* in Angular 2 templates?

旧城冷巷雨未停 提交于 2019-11-28 03:07:29
I came across a strange assignment syntax inside an Angular 2 template. <template let-col let-car="rowData" pTemplate="body"> <span [style.color]="car[col.field]">{{car[col.field]}}</span> </template> It appears that let-col and let-car="rowData" create two new variables col and car that can then be bound to inside the template. Source: https://www.primefaces.org/primeng/#/datatable/templating What is this magical let-* syntax called? How does it work? What is the difference between let-something and let-something="something else" ? Günter Zöchbauer update Angular 5 ngOutletContext was renamed

How to create dynamic menu using tree

不羁岁月 提交于 2019-11-27 15:58:35
I have an Angular project but this is not directly related to Angular and I just need the logic of create dynamic menu using tree that can also be similar as in ASP.NET MVC project. So, your suggestion for ASP.NET MVC, etc. will also be helpfu for me. I use PrimeNG Tree and want to obtain menu from a table in MSSQL database: Menu Table (the data was changed for example usage): Id | Order | ParentId | Name | 1 1 0 Documents 2 1 1 Work 3 1 2 Expenses.doc 4 2 2 Resume.doc 5 2 1 Home 6 1 5 Invoices.txt ... In order to populate the menu items, I need to generate a JSON string as shown below: {

How to set default value for PrimeNG p-dropdown

▼魔方 西西 提交于 2019-11-27 05:57:18
问题 I am using PrimeNG in my angular5 app. I have issue with p-dropdown Question I have p-dropdown for showing countries. I bind the select options correctly there it works fine (this data coming from api), but I need to set default selected option for this p-dropdown as "India". I set up ng-model value as India but it didn't work. my dummy.component.html code <div class="form-group col-md-2"> <div> <label for="inputEmail4"> Select Country</label> <span style="color:red">*</span> </div> <p

What is let-* in Angular 2 templates?

旧巷老猫 提交于 2019-11-27 05:03:54
问题 I came across a strange assignment syntax inside an Angular 2 template. <template let-col let-car="rowData" pTemplate="body"> <span [style.color]="car[col.field]">{{car[col.field]}}</span> </template> It appears that let-col and let-car="rowData" create two new variables col and car that can then be bound to inside the template. Source: https://www.primefaces.org/primeng/#/datatable/templating What is this magical let-* syntax called? How does it work? What is the difference between let

How to create dynamic menu using tree

空扰寡人 提交于 2019-11-26 18:34:09
问题 I have an Angular project but this is not directly related to Angular and I just need the logic of create dynamic menu using tree that can also be similar as in ASP.NET MVC project. So, your suggestion for ASP.NET MVC, etc. will also be helpfu for me. I use PrimeNG Tree and want to obtain menu from a table in MSSQL database: Menu Table (the data was changed for example usage): Id | Order | ParentId | Name | 1 1 0 Documents 2 1 1 Work 3 1 2 Expenses.doc 4 2 2 Resume.doc 5 2 1 Home 6 1 5