Merge branch 'upgrade-to-ng9-nebular5' into feat/material-theme

This commit is contained in:
Evgeny Lupanov 2020-03-24 17:50:16 +03:00
commit c4f0d7ac38
7 changed files with 65 additions and 51 deletions

View file

@ -1,13 +1,11 @@
import { Component } from '@angular/core';
import { ToasterConfig } from 'angular2-toaster';
import 'style-loader!angular2-toaster/toaster.css';
import {
NbComponentStatus,
NbGlobalLogicalPosition,
NbGlobalPhysicalPosition,
NbGlobalPosition,
NbToastrService,
NbToastrConfig,
} from '@nebular/theme';
@Component({
@ -18,7 +16,7 @@ import {
export class ToastrComponent {
constructor(private toastrService: NbToastrService) {}
config: ToasterConfig;
config: NbToastrConfig;
index = 1;
destroyByClick = true;

View file

@ -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>

View file

@ -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?')) {

View file

@ -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,
];

View file

@ -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,