PrimeNg (Angular): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 41: | Zeile 41: | ||
<pre> | <pre> | ||
import { AccordionModule } from 'primeng/accordion'; | import { AccordionModule } from 'primeng/accordion'; | ||
import { TreeTableModule } from 'primeng/treetable'; | import { TreeTableModule } from 'primeng/treetable'; | ||
</pre> | |||
<pre> | |||
imports: [ | |||
... | |||
TreeTableModule, | |||
AccordionModule, | |||
... | |||
], | |||
</pre> | |||
==== Inline Editing ==== | |||
<pre> | |||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | |||
</pre> | </pre> | ||
Zeile 52: | Zeile 65: | ||
FormsModule, | FormsModule, | ||
ReactiveFormsModule, | ReactiveFormsModule, | ||
... | ... | ||
], | ], | ||
Zeile 60: | Zeile 70: | ||
==== Pagination ==== | ==== Pagination ==== | ||
<pre> | |||
import { PaginatorModule } from 'primeng/paginator'; | |||
</pre> | |||
<pre> | <pre> | ||
Zeile 70: | Zeile 84: | ||
==== Context Menü ==== | ==== Context Menü ==== | ||
<pre> | |||
import { ContextMenuModule } from 'primeng/contextmenu'; | |||
</pre> | |||
<pre> | <pre> |
Version vom 17. Juli 2018, 14:07 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 { AccordionModule } from 'primeng/accordion'; import { TreeTableModule } from 'primeng/treetable';
imports: [ ... TreeTableModule, AccordionModule, ... ],
Inline Editing
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
imports: [ ... FormsModule, ReactiveFormsModule, ... ],
Pagination
import { PaginatorModule } from 'primeng/paginator';
imports: [ ... PaginatorModule, ... ],
Context Menü
import { ContextMenuModule } from 'primeng/contextmenu';
imports: [ ... ContextMenuModule ... ],
Links
Demos
https://github.com/primefaces/primeng
Zurück zu JavaScript