primeng

Primeng with jhipster

烂漫一生 提交于 2020-03-21 06:15:48
问题 I have jhipster 6.6.0 version and I want to use primeng in my application generated with jhipster. After executing the command: yo jhipster-primeng eveything is ok but then I run: npm install and I get this error: npm ERR! code ETARGET npm ERR! notarget No matching version found for @angular/cdk@^8.2.14. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as

primeNG p-dropdown stretch 100%

一笑奈何 提交于 2020-03-17 09:58:41
问题 How to set the primeNG dropdown width to stretch 100% inside its container? It seems to have fixed element.style and the .ui-dropdown{ width: 100% } override does not work. 回答1: I found to use the Responsive approach and apply .ui-fluid style with Grid CSS at container while p-dropdown should have the [autoWidth]="false" attribute. Example: <div class="ui-grid ui-grid-responsive ui-fluid"> <div class="ui-grid-row"> <div class="ui-grid-col-12"> <p-dropdown [autoWidth]="false"></p-dropdown> <

primeNG p-dropdown stretch 100%

亡梦爱人 提交于 2020-03-17 09:58:32
问题 How to set the primeNG dropdown width to stretch 100% inside its container? It seems to have fixed element.style and the .ui-dropdown{ width: 100% } override does not work. 回答1: I found to use the Responsive approach and apply .ui-fluid style with Grid CSS at container while p-dropdown should have the [autoWidth]="false" attribute. Example: <div class="ui-grid ui-grid-responsive ui-fluid"> <div class="ui-grid-row"> <div class="ui-grid-col-12"> <p-dropdown [autoWidth]="false"></p-dropdown> <

How to add app-logo-image to primeng menubar?

假装没事ソ 提交于 2020-03-01 01:47:23
问题 I followed https://www.primefaces.org/primeng/#/menubar which is good to display menu-items that can be passed as a list. My requirement is to add App related logo image to the top-left corner. Plz can someone advise how to make this work. ngOnInit() { this.items = [ {label: 'Chart', icon: 'fa-bar-chart', routerLink: 'charts'}, and my html looks as below <p-menubar [model]="items"></p-menubar> As am just passing items as an array, may I know how to display app-logo-image. 回答1: What you can do

Primeng paginator cannot reset page 1 after call API

心已入冬 提交于 2020-02-22 07:53:27
问题 I have 2 functions to load data: when init page and search page. When init page, the data display with 5 pages. I click page 3, the data show with paging is Ok. After that, enter data search. The data table is reload, but the page number does not reset to 1, it's still page 3. in html: <p-paginator rows="5" totalRecords="{{totalRecords}}" (onLazyLoad)="paginate($event)" (onPageChange)="paginate($event)" [rowsPerPageOptions]="[2,5,10,20]"></p-paginator> ts: defaultPage:0; defaultSize:2

Issue with Tab index for Prime ng datatables sort icon

你离开我真会死。 提交于 2020-02-06 07:56:08
问题 I've used the prime ng data table in my application. In that, I want to use tab index for sort icon( <p-sortIcon> ) but it's not working. can anyone help me with this?? this is how I used in code image And displaying as below, once I enter tab, got focus there but I'm unable to do sorting using the keyboard. image 回答1: Try this friend. [attr.tabindex]="1" 回答2: why dont you go with primeng default modules.... https://primefaces.org/primeng/#/table/sort 来源: https://stackoverflow.com/questions

Issue with Tab index for Prime ng datatables sort icon

烂漫一生 提交于 2020-02-06 07:56:07
问题 I've used the prime ng data table in my application. In that, I want to use tab index for sort icon( <p-sortIcon> ) but it's not working. can anyone help me with this?? this is how I used in code image And displaying as below, once I enter tab, got focus there but I'm unable to do sorting using the keyboard. image 回答1: Try this friend. [attr.tabindex]="1" 回答2: why dont you go with primeng default modules.... https://primefaces.org/primeng/#/table/sort 来源: https://stackoverflow.com/questions

Angular2 - Show/Hide section on selection of radio button

若如初见. 提交于 2020-02-01 18:30:30
问题 I have to show or hide sections based on selection of radio button <input name="options" [(ngModel)]="options" type="radio" [value]="true" [checked]="options==true"/> Yes <input name="options"[(ngModel)]="options" type="radio" [value]="false" [checked]="options==false"/> No</label> <div> <h2 ng-show="options == 'true'">Supply</h2> <h2 ng-show="options == 'false'">Demand</h2> </div> If the user clicks on Yes then we have to show 'Supply' and hide 'Demand' If the user clicks on No then we have

Angular2 - Show/Hide section on selection of radio button

与世无争的帅哥 提交于 2020-02-01 18:29:05
问题 I have to show or hide sections based on selection of radio button <input name="options" [(ngModel)]="options" type="radio" [value]="true" [checked]="options==true"/> Yes <input name="options"[(ngModel)]="options" type="radio" [value]="false" [checked]="options==false"/> No</label> <div> <h2 ng-show="options == 'true'">Supply</h2> <h2 ng-show="options == 'false'">Demand</h2> </div> If the user clicks on Yes then we have to show 'Supply' and hide 'Demand' If the user clicks on No then we have

primeng autocomplete functionality is not working

痞子三分冷 提交于 2020-01-26 04:43:05
问题 I have added the AutoCompleteModule in app.module.ts file. import { AutoCompleteModule } from 'primeng/autocomplete'; But autocomplete is not working as expected. I am getting below error: Template parse errors: Can't bind to 'ngModel' since it isn't a known property of 'p-autoComplete'. 1. If 'p-autoComplete' is an Angular component and it has 'ngModel' input, then verify that it is part of this module. 2. If 'p-autoComplete' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '