Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
ngx-dynamic-table
Advanced tools
Dynamic table generator library for Angular.
npm install ngx-dynamic-table --save
if you use yarn
you might want to use:
yarn install ngx-dynamic-table --save
ngx-dynamic-table
exposes a module called NgxDynamicTableModule
.
Import NgxDynamicTableModule
in your root module e.g: AppModule
.
// app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgxDynamicTableModule } from 'ngx-dynamic-table'; // ==> import module from library
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxDynamicTableModule // ==> add module to `imports` array.
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once the module is imported, you can start using the libaray seamlessly.
Setup table config in your component file:
//app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
config = {
tableName: 'Customer Table',
tableOffset: 5,
tableHeaders: ['name', 'phone', 'country', 'zip code', 'state', 'customer', 'order number'],
tableData: [
{
name: 'John Doe 1',
phone: '+2348161691968',
country: 'Nigeria',
'zip code': 100222,
state: 'Lagos',
customer: 12233,
'order number': 1234442223343
},
]
};
}
tableName
: Name of the table.
tableOffset
: Number of rows to be displayed per page upon pagination.
tableHeaders
: row headers of the table.
tableData
: An array of data to be displayed in the table.
P.S: elements in the tableHeaders
array must be the same as the keys in the object of each elements on the tableData
array.
Finally, add the ngx-dynamic-table
to your template:
<!-- app.component.html-->
<ngx-dynamic-table [config]=config></ngx-dynamic-table>
And we are done ...
...
FAQs
Dynamic table generator library for Angular.
The npm package ngx-dynamic-table receives a total of 5 weekly downloads. As such, ngx-dynamic-table popularity was classified as not popular.
We found that ngx-dynamic-table 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
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.