diff --git a/dmp-frontend/src/app/dmps/dmp.component.ts b/dmp-frontend/src/app/dmps/dmp.component.ts index dd670130f..0f794032e 100644 --- a/dmp-frontend/src/app/dmps/dmp.component.ts +++ b/dmp-frontend/src/app/dmps/dmp.component.ts @@ -55,8 +55,7 @@ export class DmpComponent implements OnInit{ }); this.dmps = []; this.serverService.getDmpOfUser().subscribe( - response => { - debugger; + response => { response.forEach(resp => { let pr = new Dmp(); @@ -131,7 +130,7 @@ myFunction() { } -SaveNewDmp(){ debugger; +SaveNewDmp(){ console.log(this.dmp, this.dmp.projectsDropDownKey); //this.http.post('http://someurl', JSON.stringify(this.project)) this.serverService.createDmpForProject(this.dmp, this.dmp.projectsDropDownKey) diff --git a/dmp-frontend/src/app/projects/project.html b/dmp-frontend/src/app/projects/project.html index bf5661d32..f3f94b406 100644 --- a/dmp-frontend/src/app/projects/project.html +++ b/dmp-frontend/src/app/projects/project.html @@ -1,10 +1,4 @@ - - -
Filter: diff --git a/dmp-frontend/src/app/tabs/tabs-routing.module.ts b/dmp-frontend/src/app/tabs/tabs-routing.module.ts index c8c4eb1fe..e7f07ee79 100644 --- a/dmp-frontend/src/app/tabs/tabs-routing.module.ts +++ b/dmp-frontend/src/app/tabs/tabs-routing.module.ts @@ -1,13 +1,25 @@ -import { NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { TabComponent } from './tabs.component'; +import { TabComponent } from './tabs.component'; import { AuthGuard } from '../guards/auth.guard'; -import { ProjectsComponent } from '../projects/projects.component'; -import { DmpComponent } from '../dmps/dmp.component'; +import { ProjectsComponent } from '../projects/projects.component'; +import { DmpComponent } from '../dmps/dmp.component'; const tabsRoutes: Routes = [ - { path: 'tabs', component: TabComponent, canActivate: [AuthGuard] }, + { + path: 'tabs', component: TabComponent, canActivate: [AuthGuard], + children: [ + { + path: 'projects', + component: ProjectsComponent + }, + { + path: 'dmps', + component: DmpComponent + } + ] + }, { path: 'tabs/projects', component: ProjectsComponent }, // canActivate: [AuthGuard] { path: 'tabs/dmps', component: DmpComponent } ]; diff --git a/dmp-frontend/src/app/tabs/tabs.component.ts b/dmp-frontend/src/app/tabs/tabs.component.ts index a7623cbdc..810811461 100644 --- a/dmp-frontend/src/app/tabs/tabs.component.ts +++ b/dmp-frontend/src/app/tabs/tabs.component.ts @@ -3,13 +3,25 @@ import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: ` -

Angular Router

- + + ` }) export class TabComponent { -} \ No newline at end of file +} + + + + +// \ No newline at end of file