Revision 43771
Added by Konstantina Galouni over 7 years ago
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/app/app.ts | ||
---|---|---|
38 | 38 |
}) |
39 | 39 |
export class App { |
40 | 40 |
|
41 |
constructor() { |
|
42 |
|
|
43 |
} |
|
44 |
|
|
41 | 45 |
} |
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/app/claimPages/claims/claims.component.ts | ||
---|---|---|
18 | 18 |
} |
19 | 19 |
|
20 | 20 |
ngOnInit() { |
21 |
// this.sub = this.route.queryParams.subscribe(params => {
|
|
21 |
this.sub = this.route.queryParams.subscribe(params => { |
|
22 | 22 |
|
23 |
var params = []; |
|
23 |
// var params = [];
|
|
24 | 24 |
if( this.myClaims == 'true' ){ |
25 | 25 |
this.fetchBy = "User"; |
26 | 26 |
}else{ |
... | ... | |
39 | 39 |
this.inputkeyword = this.keyword; |
40 | 40 |
this.page = ( page <= 0 ) ? 1 : page; |
41 | 41 |
this.size = ( size <= 0 ) ? 10 : size; |
42 |
this.entityTypes = []//(params['types']?params['types']:[]); |
|
42 |
this.entityTypes = [];//(params['types']?params['types']:[]);
|
|
43 | 43 |
this.setTypes(params['types']); // check the appropriate checkboxes |
44 | 44 |
// this.setSortby(params['sort']); |
45 | 45 |
this.getClaims(); |
46 | 46 |
|
47 |
// });
|
|
47 |
}); |
|
48 | 48 |
// this.sub = this.route.params.subscribe(params => { |
49 | 49 |
// console.info(this.isAdmin+" "+this.myClaims+" Fetch by: "+this.fetchBy+" Fetch id: "+this.fetchId); |
50 | 50 |
// if( this.myClaims == 'true' ){ |
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/app/app.routing.ts | ||
---|---|---|
3 | 3 |
import {ClaimsAdminComponent} from './claimPages/claims/claimsAdmin.component'; |
4 | 4 |
import {HomeComponent} from './home/home.component'; |
5 | 5 |
const appRoutes: Routes = [ |
6 |
{ path: '', component: HomeComponent, pathMatch: 'full' },
|
|
7 |
{ path: 'claims', component: ClaimsAdminComponent },
|
|
8 |
{ path: 'home', component: HomeComponent }
|
|
6 |
{ path: 'claims', component: ClaimsAdminComponent },
|
|
7 |
{ path: 'home', component: HomeComponent },
|
|
8 |
{ path: '', component: HomeComponent, pathMatch: 'full' }
|
|
9 | 9 |
|
10 | 10 |
]; |
11 | 11 |
|
modules/uoa-services-portal/trunk/sample-components/sampleComponent-2/src/main.node.ts | ||
---|---|---|
1 |
// import { NgModule } from '@angular/core'; |
|
2 |
// import { FormsModule } from '@angular/forms'; |
|
3 |
// import { RouterModule } from '@angular/router'; |
|
4 |
// import { UniversalModule } from 'angular2-universal'; |
|
5 |
// import { HomeComponent } from './app/home/home.component'; |
|
6 |
// import { App } from './app/app'; |
|
7 |
// |
|
8 |
// @NgModule({ |
|
9 |
// bootstrap: [ App ], |
|
10 |
// declarations: [ App, HomeComponent ], |
|
11 |
// imports: [ |
|
12 |
// UniversalModule, // NodeModule, NodeHttpModule, and NodeJsonpModule are included |
|
13 |
// FormsModule, |
|
14 |
// RouterModule.forRoot([ |
|
15 |
// { path: '', component: HomeComponent, pathMatch: 'full' } |
|
16 |
// ]) |
|
17 |
// ] |
|
18 |
// }) |
|
19 |
// export class MainModule { |
|
20 |
// |
|
21 |
// } |
|
1 | 22 |
import { NgModule } from '@angular/core'; |
2 | 23 |
import { FormsModule } from '@angular/forms'; |
3 |
import { RouterModule } from '@angular/router'; |
|
24 |
|
|
4 | 25 |
import { UniversalModule } from 'angular2-universal'; |
5 |
import { HomeComponent } from './app/home/home.component'; |
|
26 |
|
|
6 | 27 |
import { App } from './app/app'; |
28 |
//for routing: |
|
29 |
import {ClaimsAdminComponent} from './app/claimPages/claims/claimsAdmin.component'; |
|
30 |
import { routing } from './app/app.routing'; |
|
31 |
import {Routes, RouterModule} from "@angular/router"; |
|
7 | 32 |
|
33 |
import {Open} from './app/common/modal/open.component'; |
|
34 |
|
|
35 |
import {Alert} from './app/common/modal/alert'; |
|
36 |
import {Loading} from './app/common/modal/loading.component'; |
|
37 |
import {ClaimsComponent} from './app/claimPages/claims/claims.component'; |
|
38 |
import {ClaimsService} from './app/services/claims.service'; |
|
39 |
import {Claim} from './app/entities/claim'; |
|
40 |
import {pagingFormatterNoLoad} from './app/common/pagingFormatterNoLoad.component'; |
|
41 |
|
|
42 |
import {ClaimEntityFormatter} from './app/common/claimEntityFormatter.component'; |
|
43 |
import {PublicationTitleFormatter} from './app/common/publicationTitleFormatter.component'; |
|
44 |
import {ProjectTitleFormatter} from './app/common/projectTitleFormatter.component'; |
|
45 |
import {HomeComponent} from './app/home/home.component'; |
|
46 |
|
|
8 | 47 |
@NgModule({ |
9 | 48 |
bootstrap: [ App ], |
10 |
declarations: [ App, HomeComponent ],
|
|
49 |
declarations: [ App, ClaimsAdminComponent, ClaimsComponent, ClaimEntityFormatter,pagingFormatterNoLoad, Open, ProjectTitleFormatter, PublicationTitleFormatter,HomeComponent, Loading, Alert],
|
|
11 | 50 |
imports: [ |
12 |
UniversalModule, // NodeModule, NodeHttpModule, and NodeJsonpModule are included
|
|
51 |
UniversalModule, // BrowserModule, HttpModule, and JsonpModule are included
|
|
13 | 52 |
FormsModule, |
14 |
RouterModule.forRoot([ |
|
15 |
{ path: '', component: HomeComponent, pathMatch: 'full' } |
|
16 |
]) |
|
17 |
] |
|
53 |
routing |
|
54 |
], |
|
55 |
providers: [ ClaimsService ] |
|
18 | 56 |
}) |
19 | 57 |
export class MainModule { |
20 | 58 |
|
Also available in: Unified diff
claims.component uncomment this.sub | fill main.node.ts with contents of main.browser.ts --> solve reload problem in claims page