primeng

PrimeNg Editor is not showing up - Angular

守給你的承諾、 提交于 2019-12-06 09:45:17
I have followed many tutorials, but as of yet, I did not manage to make PrimeNG's Editor module to show up! (Other modules like Toast or buttons are working fine, it's only Editor that is not working). So here is what I did: Import module in app.module.ts import { EditorModule } from 'primeng/editor'; Installed packages npm install quill --save npm install @types/quill --save Updated angular-cli.json "styles": [ "../node_modules/quill/dist/quill.core.css", "../node_modules/quill/dist/quill.snow.css", ] "scripts": [ "../node_modules/quill/dist/quill.js" ] Inserted in HTML in 2 different ways <p

Angular - Can a child component reference a parent's template variable?

為{幸葍}努か 提交于 2019-12-06 07:23:07
I am working on an angular 4 application using a primefaces primeng component, p-contextmenu . I am trying to tell a child element to use a template variable of a parent component. app.html: <div> <router-outlet></router-outlet> <div #contextMenuHolder></div> </div> mycomponent.html: <p-contextMenu [appendTo]="contextMenuHolder" [model]="items"></p-contextMenu> Obviously it fails as the contextMenuHolder does not exist in the child, but in its parent: Angular: Identifier 'contextMenuHolder' is not defined. The component declaration, template variable declarations, and element references do not

How to make a single Primeng DataTable row editable on a button click using in Angular 2

こ雲淡風輕ζ 提交于 2019-12-06 06:58:58
I am trying to use DataTable from Primeng in Angular 2. I am displaying set of rows in datatable having a column for Edit button. On click of edit button of any row, all fields of that row should be editable. HTML: <p-dataTable [value]="testcases" [(selection)]="selectedTestCases" dataKey="ModuleID" [editable]="true" sortMode="multiple"> <p-column [style]="{'width':'10 px'}" selectionMode="multiple"></p-column> <p-column field="ModuleID" [editable]="isEditable" header="ModuleID"></p-column> <p-column field="TestCaseID" [editable]="isEditable" header="TestCaseID"></p-column> <p-column field=

access local variable within *ngIf

情到浓时终转凉″ 提交于 2019-12-06 06:33:30
I have a primeng (angular 2) dialog with a dropdown. I want to set focus to the dropdown when the dialog shows. The problem appears to be that my div is rendered conditionally. My code: <p-dialog (onShow)="fe.applyFocus()"> <div *ngIf="selectedItem"> <button pButton type="button" (click)="fe.applyFocus()" label="Focus"></button> <p-dropdown #fe id="reason" [options]="reasonSelects" [(ngModel)]="selectedReason" ></p-dropdown> </div> </p-dialog> In this code the button works fine, but the onShow() (outside the *ngIf div) tells me fe is undefined. How can I access the local variable inside the

PrimeNG <p-table> and <p-calendar> icon's not showing after Refresh in Internate Explorer (IE7,11)

吃可爱长大的小学妹 提交于 2019-12-05 18:50:15
PrimeNG and icon's not showing after Refresh in Internate Explorer (IE7,11) almost all IE Browser Versions. But in local it is working fine while I am using same IE. But in Production environment I am getting this error as you can seen in given below image : Image Might not show as some restriction but the icon in Table like before refers << < 1 2 3 4 5 > >> after refresh 1 2 3 4 5 same thing happens with PrimeNG there icone is gone too i have got some Solution which is working fine as it is some compatibility issue with IE browsers in index.html: in Head tag we have to add given below meta

date + time to timestamp in angular2

青春壹個敷衍的年華 提交于 2019-12-05 17:38:35
Am trying to learn angular2+ and i want to make a GoogleCalendar's like scheduler app. After many research, i decided to use PrimeNG. The output format of the calendar is 2016-01-16T16:00:00 that's seems great and complete. But the api i want to interract with uses timeStamp... I tried to make a Javascript function who's parsing my date format : function toTimestamp(strDate){ var datum = Date.parse(strDate); return datum/1000; } alert(toTimestamp('02/13/2009 23:31:30')); But my problem is that i can't use the format of PrimeNG... Did anyone know how can i interact corectly with the format i

PrimeNG DataTable Custom Sorting or filtering (Angular 2)

橙三吉。 提交于 2019-12-05 14:23:28
I am facing issue in sorting/Filtering date column in PrimeNg Datatable.As i am displaying date "dd/mm/yyyy" string . if is use template to display "dd/mm/yyyy" then filter is not working as filter working on actual data bind which is in date ISO format. if convert data to string format from the back end then sort is not correct as it sort on string instead of date. I solved this issue using moment.js, because it's easier and faster, but always code can be customized a little bit if You want to do it without any frameworks (i hope few more if conditions, and string conversions) So You have to

PrimeNG: Differnce between p-Table and p-dataTable

依然范特西╮ 提交于 2019-12-05 10:53:40
https://www.primefaces.org/primeng/#/table As per the above link in the latest version of PrimeNG p-dataTable is deprecated. I have implemented my tables using version 5.2.7. Does it mean I have changed all the implementation? I have made for p-dataTable to p-table to use all new feature available for the table? What is the best way to upgrade my table implementation? And if I don't do that then will the latest version of PrimeNG will support for p-dataTable ? DirtyMind p-table which is also known as TurboTable , we can say it is advanced version of p-dataTable . PrimeNG team highly improved.

Angular 2 PrimeNG Scheduler onDrop event get date

给你一囗甜甜゛ 提交于 2019-12-05 03:25:34
问题 I am trying to implement drag and drop support with primeNG Scheduler. Here is my template. <p-schedule [droppable]="true" (onDrop)="handleDropEvent($event)" pDroppable="test"> But in handler my event is DragEvent and not calendar event with date and all other things from it. handleDropEvent(event: any) { console.log(event); //prints DragEvent } One thought is that pDroppable="test" breaks it somehow cause as i initially did it without it and it looked natural to me. But than no event happens

ERROR Missing number at position 0 when using setValue angular 4

风格不统一 提交于 2019-12-05 01:19:36
I'm using Angular 4 with reactiveforms, momentjs , and primeng calendar I'm tying to use setValue and have tried patchValue on a reactiveForm field which contains a Date. This date has been created via a primeng calendar. purchaseDate: Sat Sep 02 2017 00:00:00 GMT+0100 (GMT Daylight Time) I use this 'date' to do a couple of things and then onSumbit of the form I convert the date using momentjs to a clean format ready for the backend to accept (i.e. YYYY.MM.DD) using .moment().format(.... However when I run the .setValue I'm getting the following console error ERROR Missing number at position 0