Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
angular2-datatable-ziyu
Advanced tools
Check live demo in plunker
npm i -S angular2-datatable
AppModule.ts
import {NgModule} from "@angular/core";
...
import {DataTableModule} from "angular2-datatable";
@NgModule({
imports: [
...
DataTableModule
],
...
})
export class AppModule {
}
AppComponent.html
<table class="table table-striped" [mfData]="data" #mf="mfDataTable" [mfRowsOnPage]="5">
<thead>
<tr>
<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>{{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]
mfDataTable
mfData: any[]
- array of data to display in tablemfRowsOnPage: number
- number of rows should be displayed on page (default: 1000)mfActivePage: number
- page number (default: 1)mfSortBy: any
- sort by parametermfSortOrder: string
- sort order parameter, "asc" or "desc"mfSortByChange: any
- sort by parametermfSortOrderChange: any
- sort order parametermfDefaultSorter
componentmfDefaultSorter
by: 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.
mfBootstrapPaginator
rowsOnPageSet: number
- specify values for buttons to change number of diplayed rowsFAQs
DataTable component for Angular2 framework
We found that angular2-datatable-ziyu 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.