Formatting
This commit is contained in:
parent
2f34aedce5
commit
51f1967fb2
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "ng-datatable",
|
||||
"name": "@ztimson/ng-datatable",
|
||||
"version": "1.0.0",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
|
||||
|
@ -1,15 +1,11 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from "@angular/forms";
|
||||
import {BrowserModule} from "@angular/platform-browser";
|
||||
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {NgDatatableComponent} from './ng-datatable.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
],
|
||||
imports: [BrowserModule, FormsModule],
|
||||
declarations: [NgDatatableComponent],
|
||||
exports: [NgDatatableComponent]
|
||||
})
|
||||
export class NgDatatableModule { }
|
||||
export class NgDatatableModule {}
|
||||
|
@ -1,3 +1,3 @@
|
||||
export * from './lib/column'
|
||||
export * from './lib/ng-dataTable.component';
|
||||
export * from './lib/ng-dataTable.module';
|
||||
export * from './lib/ng-datatable.component';
|
||||
export * from './lib/ng-datatable.module';
|
||||
|
@ -1,24 +1,19 @@
|
||||
Table CSS <input [(ngModel)]="tableCSS">
|
||||
Selection Mode <select [(ngModel)]="selectionMode">
|
||||
Table CSS
|
||||
<input [(ngModel)]="tableCSS"> Selection Mode
|
||||
<select [(ngModel)]="selectionMode">
|
||||
<option>None</option>
|
||||
<option>single</option>
|
||||
<option>multi</option>
|
||||
</select>
|
||||
Checkbox <input type="checkbox" [(ngModel)]="checkbox">
|
||||
Expandable <input type="checkbox" [(ngModel)]="expandable">
|
||||
<br><br>
|
||||
<input placeholder="Search" (keyup)="search.next($event.target.value)">
|
||||
Checkbox
|
||||
<input type="checkbox" [(ngModel)]="checkbox"> Expandable
|
||||
<input type="checkbox" [(ngModel)]="expandable">
|
||||
<br>
|
||||
Selected: {{table.selectedRows.size}}/{{table.processedData.length}}
|
||||
<ng-datatable #table
|
||||
[cssClass]="tableCSS"
|
||||
[columns]="columns"
|
||||
[data]="data"
|
||||
[expandedTemplate]="expandable ? expanded : null"
|
||||
[showCheckbox]="checkbox"
|
||||
[paginate]="false"
|
||||
[selectionMode]="selectionMode == 'None' ? null : selectionMode"
|
||||
(rowSelected)="log($event)">
|
||||
<br>
|
||||
<input placeholder="Search" (keyup)="search.next($event.target.value)">
|
||||
<br> Selected: {{table.selectedRows.size}}/{{table.processedData.length}}
|
||||
<ng-datatable #table [cssClass]="tableCSS" [columns]="columns" [data]="data" [expandedTemplate]="expandable ? expanded : null"
|
||||
[showCheckbox]="checkbox" [paginate]="false" [selectionMode]="selectionMode == 'None' ? null : selectionMode" (rowSelected)="log($event)">
|
||||
<ng-template #expanded let-object="object">
|
||||
Hello {{object.firstName}} {{object.lastName}}, How are you today?
|
||||
<span *ngIf="object.age < 18">I can see that you are under age.</span>
|
||||
@ -27,4 +22,4 @@ Selected: {{table.selectedRows.size}}/{{table.processedData.length}}
|
||||
<ng-template #age let-value="value">
|
||||
<strong [ngClass]="{'text-success': value < 18, 'text-danger': value > 84}">{{value}}</strong>
|
||||
</ng-template>
|
||||
</ng-datatable>
|
||||
</ng-datatable>
|
Loading…
Reference in New Issue
Block a user