dataTable
This commit is contained in:
parent
45c1fb966e
commit
2bcb90807c
|
@ -4,7 +4,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { RouterModule, Routes, Router } from '@angular/router';
|
||||
import {DataTableModule } from 'angular-4-data-table-bootstrap-4';
|
||||
import {DataTableModule } from 'angular-2-data-table';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { DynamicFormComponent } from './form/dynamic-form.component';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {DataTableModule } from 'angular-4-data-table-bootstrap-4';
|
||||
import {DataTableModule } from 'angular-2-data-table';
|
||||
|
||||
import { ProjectsComponent } from './projects.component';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Router, ActivatedRoute } from '@angular/router';
|
|||
import { ServerService } from '../../app/services/server.service';
|
||||
import { Project } from '../entities/model/project';
|
||||
import { Dmp } from '../entities/model/Dmp';
|
||||
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
||||
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-2-data-table';
|
||||
|
||||
@Component({
|
||||
selector: 'projects',
|
||||
|
@ -57,11 +57,13 @@ export class ProjectsComponent implements OnInit{
|
|||
pr.definition = resp.definition;
|
||||
pr.uri = resp.uri;
|
||||
pr.dmp = new Dmp();
|
||||
pr.dmp.id = resp.dmp; debugger;
|
||||
pr.dmp.id = resp.dmp =! null? resp.dmp.id : null;
|
||||
pr.dmp.dataset = resp.dmp.dataset != null ? resp.dmp.dataset.id: null;
|
||||
// pr.dmp.id = resp.dmp;
|
||||
pr.dmp.id = resp.dmp =! null || resp.dmp ==! undefined ? resp.dmp.id : null;
|
||||
// pr.dmp.dataset = resp.dmp.dataset != null ? resp.dmp.dataset.id: null;
|
||||
this.projects.push(pr);
|
||||
this.afterLoad();
|
||||
var params = {limit:8,offset:0, sortAsc:false}
|
||||
this.afterLoad();
|
||||
this.projectResource.query(params).then(projects => this.projects = projects);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue