claims.component uncomment this.sub | fill main.node.ts with contents of main.browser.ts --> solve reload problem in claims page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@43771 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2016-09-22 14:45:53 +00:00
parent d96bead723
commit 6c5687c80f
4 changed files with 57 additions and 15 deletions

View File

@ -3,9 +3,9 @@ import { Routes, RouterModule } from '@angular/router';
import {ClaimsAdminComponent} from './claimPages/claims/claimsAdmin.component';
import {HomeComponent} from './home/home.component';
const appRoutes: Routes = [
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'claims', component: ClaimsAdminComponent },
{ path: 'home', component: HomeComponent }
{ path: 'home', component: HomeComponent },
{ path: '', component: HomeComponent, pathMatch: 'full' }
];

View File

@ -38,4 +38,8 @@ import 'rxjs/Rx';
})
export class App {
constructor() {
}
}

View File

@ -18,9 +18,9 @@ export class ClaimsComponent {
}
ngOnInit() {
// this.sub = this.route.queryParams.subscribe(params => {
this.sub = this.route.queryParams.subscribe(params => {
var params = [];
// var params = [];
if( this.myClaims == 'true' ){
this.fetchBy = "User";
}else{
@ -39,12 +39,12 @@ export class ClaimsComponent {
this.inputkeyword = this.keyword;
this.page = ( page <= 0 ) ? 1 : page;
this.size = ( size <= 0 ) ? 10 : size;
this.entityTypes = []//(params['types']?params['types']:[]);
this.entityTypes = [];//(params['types']?params['types']:[]);
this.setTypes(params['types']); // check the appropriate checkboxes
// this.setSortby(params['sort']);
this.getClaims();
// });
});
// this.sub = this.route.params.subscribe(params => {
// console.info(this.isAdmin+" "+this.myClaims+" Fetch by: "+this.fetchBy+" Fetch id: "+this.fetchId);
// if( this.myClaims == 'true' ){

View File

@ -1,20 +1,58 @@
// import { NgModule } from '@angular/core';
// import { FormsModule } from '@angular/forms';
// import { RouterModule } from '@angular/router';
// import { UniversalModule } from 'angular2-universal';
// import { HomeComponent } from './app/home/home.component';
// import { App } from './app/app';
//
// @NgModule({
// bootstrap: [ App ],
// declarations: [ App, HomeComponent ],
// imports: [
// UniversalModule, // NodeModule, NodeHttpModule, and NodeJsonpModule are included
// FormsModule,
// RouterModule.forRoot([
// { path: '', component: HomeComponent, pathMatch: 'full' }
// ])
// ]
// })
// export class MainModule {
//
// }
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { UniversalModule } from 'angular2-universal';
import { HomeComponent } from './app/home/home.component';
import { App } from './app/app';
//for routing:
import {ClaimsAdminComponent} from './app/claimPages/claims/claimsAdmin.component';
import { routing } from './app/app.routing';
import {Routes, RouterModule} from "@angular/router";
import {Open} from './app/common/modal/open.component';
import {Alert} from './app/common/modal/alert';
import {Loading} from './app/common/modal/loading.component';
import {ClaimsComponent} from './app/claimPages/claims/claims.component';
import {ClaimsService} from './app/services/claims.service';
import {Claim} from './app/entities/claim';
import {pagingFormatterNoLoad} from './app/common/pagingFormatterNoLoad.component';
import {ClaimEntityFormatter} from './app/common/claimEntityFormatter.component';
import {PublicationTitleFormatter} from './app/common/publicationTitleFormatter.component';
import {ProjectTitleFormatter} from './app/common/projectTitleFormatter.component';
import {HomeComponent} from './app/home/home.component';
@NgModule({
bootstrap: [ App ],
declarations: [ App, HomeComponent ],
declarations: [ App, ClaimsAdminComponent, ClaimsComponent, ClaimEntityFormatter,pagingFormatterNoLoad, Open, ProjectTitleFormatter, PublicationTitleFormatter,HomeComponent, Loading, Alert],
imports: [
UniversalModule, // NodeModule, NodeHttpModule, and NodeJsonpModule are included
UniversalModule, // BrowserModule, HttpModule, and JsonpModule are included
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' }
])
]
routing
],
providers: [ ClaimsService ]
})
export class MainModule {