fst-ngx-view-index-rds
v1.0.9
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.2.
Downloads
4
Readme
NgxViewIndexRds
This library was generated with Angular CLI version 14.0.2.
Code scaffolding
Run ng generate component component-name --project NgxViewIndexRds
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project NgxViewIndexRds
.
Note: Don't forget to add
--project NgxViewIndexRds
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build NgxViewIndex
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build NgxViewIndex
, go to the dist folder cd dist/ngx-view-index-rds
and run npm publish
.
Installation
npm install fst-ngx-view-index-rds@latest
Import the styles in your main stylesheet:
@import '../node_modules/fst-ngx-view-index-rds/scss/ngx-view-index-rds';
Angular component.ts
private sections: { value: string, name: string }[] = [];
public viewIndex: Configuration = {
loadData: (filtrations: any) => this.service.listObjecs(filtrations),
columns: [
{ field: 'id', title: 'ID', cssClass: 'box__headline' },
{ field: 'name', title: 'Name', cssClass: 'box__headline' },
],
possibilities: [
{ type: PossibilityEnum.URL, url: '/module/edit/:id:', title: 'Editace', icon: 'icon--pencil', permission: 'edit'},
{ type: PossibilityEnum.TRASH, function: (id: number) => this.service.deleteObject(id), title: 'Smazání', icon: 'icon--times-circle', permission: 'trash'},
],
topActions: [
{ type: PossibilityEnum.URL, url: '/module/edit/', title: 'Nová položka', icon: 'icon--plus', permission: 'add'},
],
filtrations: [
{ type: FiltrationEnum.TEXT, field: 'name', title: 'Jméno' },
],
itemsPerPage: 10,
conditions: {},
removeTrash: true,
preloaderIndex: true,
data: [],
dataAll: [],
sortKey: 'id',
sortDirection: SortEnum.ASC,
styles: {
filtration: 'col-12',
},
useBackendSort: true,
};
Angular component.html
<ngx-view-index [viewIndex]="viewIndex"></ngx-view-index>
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
Author
Fastest Solution s.r.o.