PrimeNg (Angular): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 61: Zeile 61:
==== Pagination ====
==== Pagination ====


<pre>
imports: [
imports: [
   ...
   ...
Zeile 66: Zeile 67:
   ...
   ...
],
],
</pre>


==== Context Menü ====
==== Context Menü ====


<pre>
imports: [
imports: [
   ...
   ...
Zeile 74: Zeile 77:
   ...
   ...
],
],
</pre>


== Links ==
== Links ==

Version vom 17. Juli 2018, 14:04 Uhr

General

Installation

npm install primeng --save
npm install primeicons --save

angular.json

Hier wird omega/theme.css verwendet, es gibt jedoch verschiedene verfügbare Themes:

"styles": [
  "src/styles.css",
  "node_modules/primeicons/primeicons.css",
  "node_modules/primeng/resources/themes/omega/theme.css",
  "node_modules/primeng/resources/primeng.min.css"
],

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule} from '@angular/platform-browser/animations';
imports: [
  BrowserModule,
  BrowserAnimationsModule,
  ...
],

TreeTable

app.module.ts

import { FormsModule, ReactiveFormsModule } from '@angular/forms';

import { AccordionModule } from 'primeng/accordion';
import { TreeTableModule } from 'primeng/treetable';
imports: [
  ...
  FormsModule,
  ReactiveFormsModule,
  ...
  TreeTableModule,
  AccordionModule,
  ...
],

Pagination

imports: [
  ...
  PaginatorModule,
  ...
],

Context Menü

imports: [
  ...
  ContextMenuModule
  ...
],

Links

Demos

https://github.com/primefaces/primeng


Zurück zu JavaScript