
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@jdcalkins/angular2-datatable
Advanced tools
npm i -S @jdcalkins/angular2-datatable
app.ts
import {Component} from '@angular/core';
import {DataTableDirectives} from 'angular2-datatable/datatable';
@Component({
selector: 'app',
templateUrl: 'app.html',
directives: [DataTableDirectives]
})
export class App {
private data: any[] = ...
selectedEntities: any[];
}
app.html
<table class="table table-striped" [mfData]="data" #mf="mfDataTable" [mfRowsOnPage]="5" (mfSelectedEntities)="setSelectedEntities($event)">
<thead>
<tr>
<th>
<mfRowSelectorHead [mfTable]="mf"></mfRowSelectorHead>
</th>
<th style="width: 20%">
<mfDefaultSorter by="name">Name</mfDefaultSorter>
</th>
<th style="width: 50%">
<mfDefaultSorter by="email">Email</mfDefaultSorter>
</th>
<th style="width: 10%">
<mfDefaultSorter by="age">Age</mfDefaultSorter>
</th>
<th style="width: 20%">
<mfDefaultSorter by="city">City</mfDefaultSorter>
</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of mf.data">
<td><mfRowSelector [selectedEntities]="mf.selectedEntities" [entity]="item" (selectEntity)="mf.addSelectedEntity($event)"></mfRowSelector></td>
<td>{{item.name}}</td>
<td>{{item.email}}</td>
<td class="text-right">{{item.age}}</td>
<td>{{item.city | uppercase}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<mfBootstrapPaginator [rowsOnPageSet]="[5,10,25]"></mfBootstrapPaginator>
</td>
</tr>
</tfoot>
</table>
mfData directivetable[mfData]mfDataTablemfData: any[] - array of data to display on tablemfRowsOnPage: number - number of rows should be displayed on page (default: 1000)mfActivePage: number - page number should be displayed on init (default: 1)mfDefaultSorter componentmfDefaultSorterby: any - specify how to sort data (argument for lodash function _.sortBy )mfBootstrapPaginator componentDisplays buttons for changing current page and number of displayed rows using bootstrap template (css for bootstrap is required). If array length is smaller than current displayed rows on page then it doesn't show button for changing page. If array length is smaller than min value rowsOnPage then it doesn't show any buttons.
mfBootstrapPaginatorrowsOnPageSet: number - specify values for buttons to change number of diplayed rowsFAQs
DataTable component for Angular2 framework
We found that @jdcalkins/angular2-datatable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.