mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-21 09:50:13 +01:00
feat: update ng2-smart-table to 1.6
This commit is contained in:
parent
c56b348eb8
commit
929406eb42
6 changed files with 39 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<!-- <nb-card>
|
||||
<nb-card>
|
||||
<nb-card-header>
|
||||
Smart Table
|
||||
</nb-card-header>
|
||||
|
|
@ -7,4 +7,4 @@
|
|||
<ng2-smart-table [settings]="settings" [source]="source" (deleteConfirm)="onDeleteConfirm($event)">
|
||||
</ng2-smart-table>
|
||||
</nb-card-body>
|
||||
</nb-card> -->
|
||||
</nb-card>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Component } from '@angular/core';
|
||||
// import { LocalDataSource } from 'ng2-smart-table';
|
||||
import { LocalDataSource } from 'ng2-smart-table';
|
||||
|
||||
// import { SmartTableData } from '../../../@core/data/smart-table';
|
||||
import { SmartTableData } from '../../../@core/data/smart-table';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-smart-table',
|
||||
|
|
@ -53,12 +53,12 @@ export class SmartTableComponent {
|
|||
},
|
||||
};
|
||||
|
||||
// source: LocalDataSource = new LocalDataSource();
|
||||
source: LocalDataSource = new LocalDataSource();
|
||||
|
||||
// constructor(private service: SmartTableData) {
|
||||
// const data = this.service.getData();
|
||||
// this.source.load(data);
|
||||
// }
|
||||
constructor(private service: SmartTableData) {
|
||||
const data = this.service.getData();
|
||||
this.source.load(data);
|
||||
}
|
||||
|
||||
onDeleteConfirm(event): void {
|
||||
if (window.confirm('Are you sure you want to delete?')) {
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@ import { NgModule } from '@angular/core';
|
|||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { TablesComponent } from './tables.component';
|
||||
// import { SmartTableComponent } from './smart-table/smart-table.component';
|
||||
import { SmartTableComponent } from './smart-table/smart-table.component';
|
||||
import { TreeGridComponent } from './tree-grid/tree-grid.component';
|
||||
|
||||
const routes: Routes = [{
|
||||
path: '',
|
||||
component: TablesComponent,
|
||||
children: [
|
||||
// {
|
||||
// path: 'smart-table',
|
||||
// component: SmartTableComponent,
|
||||
// },
|
||||
{
|
||||
path: 'smart-table',
|
||||
component: SmartTableComponent,
|
||||
},
|
||||
{
|
||||
path: 'tree-grid',
|
||||
component: TreeGridComponent,
|
||||
|
|
@ -28,6 +28,6 @@ export class TablesRoutingModule { }
|
|||
|
||||
export const routedComponents = [
|
||||
TablesComponent,
|
||||
// SmartTableComponent,
|
||||
SmartTableComponent,
|
||||
TreeGridComponent,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NbCardModule, NbIconModule, NbInputModule, NbTreeGridModule } from '@nebular/theme';
|
||||
// import { Ng2SmartTableModule } from 'ng2-smart-table';
|
||||
import { Ng2SmartTableModule } from 'ng2-smart-table';
|
||||
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { TablesRoutingModule, routedComponents } from './tables-routing.module';
|
||||
|
|
@ -14,7 +14,7 @@ import { FsIconComponent } from './tree-grid/tree-grid.component';
|
|||
NbInputModule,
|
||||
ThemeModule,
|
||||
TablesRoutingModule,
|
||||
// Ng2SmartTableModule,
|
||||
Ng2SmartTableModule,
|
||||
],
|
||||
declarations: [
|
||||
...routedComponents,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue