primeng | The Most Complete Angular UI Component Library | Chart library
kandi X-RAY | primeng Summary
kandi X-RAY | primeng Summary
The Most Complete Angular UI Component Library
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of primeng
primeng Key Features
primeng Examples and Code Snippets
private _sourceOptions: string[];
@Input set sourceOptions(options: string[]) {
// Ensure we're not passing a reference to the array down because it may still
// be changed. Create a new array with the same items. This can also hel
// It's better to keep using Observable instead of Promise as it is more flexible and powerful
// and shareReplay() avoid requesting your server again if subscribed multiple times
postProfiles(): Observable {
const url = 'profiles/crea
npm i primeng@8.1.1 primeicons @angular/animations
yarn add primeng@8.1.1 primeicons @angular/animations
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
impo
npm install primeng --save
npm install primeflex --save
"./node_modules/primeng/resources/primeng.css",
"./node_modules/primeflex/primeflex.css"
1
2
3
[
{
"TITLE": "parent1",
"SUBMENU": [
{
"SUBMENU": [
{
"SUBMENU": [
{
"TITLE": "Child 1"
}
npm install primeng --save //install prime in your machine
npm install primeicons --save //install prime icon in your machine
"../node_modules/primeicons/primeicons.css",
"../node_modules/primeng/reso
yarn add primeng
yarn add @angular/animations
ng g component new-cmp
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {AccordionModule, RatingModule, Cal
- ng new project --style=scss
- npm install primeng –-save
- npm install font-awesome --save
- @import
"../node_modules/font-awesome/css/font-awesome.min.css", //is used by the st
// Patches for PrimeNG focus bugs.
import { Dropdown, RadioButton } from 'primeng/primeng';
const originalDropdownOnInputFocus = Dropdown.prototype.onInputFocus;
Dropdown.prototype.onInputFocus = function(event: any): void {
setTimeout(
Community Discussions
Trending Discussions on primeng
QUESTION
I have created a project in the Angular 13 version. I have installed PrimeNG controls (13.3.0 version) . Now I want to use the Steps control but it's not working. In my Account Module I have created a folder and inside the folder, I have the below components:
- signup
- organization
- user
Now I have added the PrimeNG Steps control in the signup component to load the organization and user component inside it. Here is the signup component's code:
HTML:
...ANSWER
Answered 2022-Mar-17 at 05:09Here is my answer. I forgot to add the router directive just after the steps component. Here is the final code of signup HTML:
QUESTION
If I add some rows to the table, the table view gets dynamically updated, but the filters I apply reflect only initial data.
For eg, if I apply the filter "startsWith
" on a header called "Title
" with a filter value of "zaalim
", then if the initial dataset didn't have any row with title
starting with "zaalim
", then the view will keep showing empty even after I add such rows after every 10 seconds. If you remove the filter, you can see the new rows with Title
starting with "zaalim
" being gradually added.
I want the filtered view to reflect the change in dataset. (Even the pagination doesn't get automatically refreshed). Maybe I can re-trigger existing filters after adding each new row? How to do that?
Here is the stackblitz
...ANSWER
Answered 2022-Mar-14 at 17:43It is a hacky solution, but you can add a ViewChild for the table to your component:
QUESTION
Apparently throwError(error)
is now deprecated. The IntelliSense of VS Code suggests throwError(() => new Error('error')
. new Error(...)
accepts only strings. What's the correct way to replace it without breaking my HttpErrorHandlerService
?
ANSWER
Answered 2021-Aug-04 at 19:08Instead of this:
QUESTION
Hi I am new to angular and I am using primeNg components in which I have a form and in my form I have a tag and I have my JSON data coming from the backend and each record has
{...
"status": "ACTIVE"
....},
either the status is active or inactive. I want this inputSwitch to be in ON position if the status is Active else keep it in Off Position. This is what my input switch looks like
Also to mention - I have many no: of records which have status active or inactive.
This is my input formcontrolName
...ANSWER
Answered 2022-Feb-22 at 07:51When you init the form via reactive forms (guess so since you are using formControlName).
your.component.html:
QUESTION
I want to perform filtering into columns of a table that contains data in Greek language.
Unfortunately the component internally does not seem to recognize the characters with tones to be the same with the same character without a tone. For example a vowel with a tone (ή) is not matched with the same vowel witout tone (η).
Example with pictures below:
1) Filtering using the tone ή
2) Filtering without using the tone η (which does not match with ή)
In most filters out there on the web, characters with tone are matched with the same characters without tone and vice versa, how can I achieve the same here? Maybe if I could use the localeCompare function as filter function as an attribute in the columnFilter, but the documentation is not detailed in the table filtering section
I posted the same question in their github repository but I have not received any answer yet.
...ANSWER
Answered 2022-Feb-15 at 19:51After reading their documentation, it looks like they don't expose their p-columnFilter component, nor is there an eventEmitter to get value changes on the input fields.
The fastest way to resolve your issue would be using their filter service and writing a custom filtering like this. (I used locale-contains library for this one): https://stackblitz.com/edit/primeng-filterservice-demo-qv3t3k?file=src%2Fapp%2Fapp.component.ts
QUESTION
I need to filter the table on view load.
For example, I have a table with 5 columns (Woid
, Customer
, AdapterID
, Assignee
, Status
). On load, I want to filter woid
column using 'contains'
. I accomplished filtering onLoad
but when I want to filter again that column later I got an error:
[i]'Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.'[/i]
Program code below...
...ANSWER
Answered 2021-Oct-10 at 10:36I replaced this line of code:
QUESTION
I am using p-tabview and I want to implement scrollable property as stated in primeng site: https://www.primefaces.org/primeng/showcase/#/tabview
But I am getting an error stating Can't bind to 'scrollable' since it isn't a known property of 'p-tabView'. Am I missing anything?
StackBlitz demo: https://stackblitz.com/edit/primeng-tabview-demo-jj9f2g?file=src/app/app.component.ts
Reference code:
...ANSWER
Answered 2021-Nov-26 at 06:18This issue was fixed lately at https://github.com/primefaces/primeng/issues/10119
So you need to use primeng version 12.1.1 or above
QUESTION
I am getting issues dynamically loading components using the following syntax:
...ANSWER
Answered 2022-Feb-07 at 11:32You have a dependency conflict.
@angular/pwa
internally adds@angular/service-worker
package for you.
The error message says that you are installing @angular/service-worker
version '12.2.16' which internally depends on @angular/core
version '12.2.16'.
Your package.json has @angular/core
version '12.1.3'.
So, you need to install the @angular/pwa
not with @latest
but with the version that's compatible with your current setup.
Install it with ng add @angular/pwa@12.1.3
QUESTION
I am using primeNg row expansion feature. Code is here : https://primefaces.org/primeng/showcase/#/table/rowexpansion
I have a requirement to display yellow background for odd rows and grey background for even rows, but the additional inserted row having the child table should not be included during calculation.
Consider the below html example, where user has expanded the first row. I do not want the rows with 'table-row-expand' class to be considered in the even/odd rule. Here I want first row to have yellow color, second row to have grey color and third row to have yellow again. The expanded row should not have any background.
Note that the .table-row-expand row gets added to the DOM only when user expands the corresponding row. Kindly help me with this problem.
...ANSWER
Answered 2022-Feb-03 at 20:11Save yourself a headache and drop in a wee bit 'o JavaScript. You may need to put this code in a function to be called when new rows are added.
QUESTION
I am using p-picklist
and I want to edit target list span data used for displaying the value.
I am using the source code: https://primefaces.org/primeng/showcase/#/picklist
How can I make product name editable in the target list.
...ANSWER
Answered 2021-Dec-27 at 14:18Turning the
{{product.name}}
into an input with [(ngModel)]="product.name"
seem to work.
In order to check if the templated item is listed under target
and not under source
, you can check the element's position on the DOM; if it is inside .p-picklist-target
, show the input
, else show h5
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install primeng
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page