Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.

Commit 28f265f

Browse files
committed
Merge branch 'master' of https://github.com/Cloud-CV/EvalAI-ngx into improve_coverage_ngx
2 parents 3dcb306 + 932a9c0 commit 28f265f

File tree

51 files changed

+1151
-443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1151
-443
lines changed

src/app/app-routing.module.ts

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,72 @@
11
import { NgModule } from '@angular/core';
2-
import { RouterModule, Routes } from '@angular/router';
3-
import { HomeComponent } from './components/home/home.component';
4-
import { PubliclistsComponent } from './components/publiclists/publiclists.component';
5-
import { TeamlistComponent } from './components/publiclists/teamlist/teamlist.component';
6-
import { ContactComponent } from './components/contact/contact.component';
7-
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
8-
import { GetInvolvedComponent } from './components/get-involved/get-involved.component';
9-
import { AboutComponent } from './components/about/about.component';
10-
import { ChallengeCreateComponent } from './components/challenge-create/challenge-create.component';
11-
import { DashboardComponent } from './components/dashboard/dashboard.component';
12-
import { ProfileComponent } from './components/profile/profile.component';
13-
import { OurTeamComponent } from './components/our-team/our-team.component';
2+
import { RouterModule, Routes, PreloadAllModules } from '@angular/router';
3+
4+
// import component
145
import { NotFoundComponent } from './components/not-found/not-found.component';
15-
import {AnalyticsComponent} from './components/analytics/analytics.component';
16-
import {HostAnalyticsComponent} from './components/analytics/host-analytics/host-analytics.component';
176

187
const routes: Routes = [
198
{
209
path: '',
21-
component: HomeComponent,
10+
loadChildren: './components/home/home.module#HomeModule',
2211
data: {
2312
'title': 'EvalAI - Welcome'
2413
}
2514
},
2615
{
2716
path: 'about',
28-
component: AboutComponent
17+
loadChildren: './components/about/about.module#AboutModule',
18+
},
19+
{
20+
path: 'auth',
21+
loadChildren: './components/auth/auth.module#AuthModule',
22+
},
23+
{
24+
path: 'challenge',
25+
redirectTo: 'challenges'
26+
},
27+
{
28+
path: 'challenge/:id',
29+
loadChildren: './components/challenge/challenge.module#ChallengeModule',
30+
},
31+
{
32+
path: 'challenges',
33+
loadChildren: './components/publiclists/publiclist.module#PubliclistModule',
2934
},
3035
{
3136
path: 'challenge-create',
32-
component: ChallengeCreateComponent
37+
loadChildren: './components/challenge-create/challenge-create.module#ChallengeCreateModule',
3338
},
3439
{
3540
path: 'contact',
36-
component: ContactComponent
41+
loadChildren: './components/contact/contact.module#ContactModule',
3742
},
3843
{
3944
path: 'dashboard',
40-
component: DashboardComponent,
45+
loadChildren: './components/dashboard/dashboard.module#DashboardModule',
4146
},
4247
{
4348
path: 'analytics',
44-
component: AnalyticsComponent,
45-
children: [
46-
{path: '', redirectTo: 'host-analytics', pathMatch: 'full'},
47-
{path: 'host-analytics', component: HostAnalyticsComponent}
48-
]
49+
loadChildren: './components/analytics/analytics.module#AnalyticsModule',
4950
},
5051
{
5152
path: 'get-involved',
52-
component: GetInvolvedComponent
53+
loadChildren: './components/get-involved/get-involved.module#GetInvolvedModule',
5354
},
5455
{
5556
path: 'our-team',
56-
component: OurTeamComponent
57+
loadChildren: './components/our-team/our-team.module#OurTeamModule',
5758
},
5859
{
5960
path: 'privacy-policy',
60-
component: PrivacyPolicyComponent
61+
loadChildren: './components/privacy-policy/privacy-policy.module#PrivacyPolicyModule',
6162
},
6263
{
6364
path: 'profile',
64-
component: ProfileComponent
65+
loadChildren: './components/profile/profile.module#ProfileModule',
6566
},
6667
{
6768
path: 'teams',
68-
component: PubliclistsComponent,
69-
children: [
70-
{path: '', redirectTo: 'participants', pathMatch: 'full'},
71-
{path: 'participants', component: TeamlistComponent},
72-
{path: 'hosts', component: TeamlistComponent}
73-
]
69+
loadChildren: './components/publiclists/publiclist.module#TeamlistsModule',
7470
},
7571
{
7672
path: '404',

src/app/app.module.ts

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
3-
import { NgModule } from '@angular/core';
3+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
44
import { HttpClientModule } from '@angular/common/http';
5-
import { EmailValidator, FormsModule } from '@angular/forms';
5+
import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
66

77
// Import services
88
import { WindowService } from './services/window.service';
@@ -15,49 +15,31 @@ import { EndpointsService } from './services/endpoints.service';
1515
// Import Components
1616
import { AppComponent } from './app.component';
1717
import { AppRoutingModule } from './app-routing.module';
18-
import { ContactComponent } from './components/contact/contact.component';
19-
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
20-
import { GetInvolvedComponent } from './components/get-involved/get-involved.component';
21-
import { AboutComponent } from './components/about/about.component';
22-
import { ChallengeCreateComponent } from './components/challenge-create/challenge-create.component';
23-
import { ProfileComponent } from './components/profile/profile.component';
24-
import { NotFoundComponent } from './components/not-found/not-found.component';
25-
import { OurTeamComponent } from './components/our-team/our-team.component';
26-
import { NgxTwitterTimelineModule } from 'ngx-twitter-timeline';
27-
import { AnalyticsComponent } from './components/analytics/analytics.component';
28-
import { HostAnalyticsComponent } from './components/analytics/host-analytics/host-analytics.component';
29-
import { AuthModule } from './components/auth/auth.module';
30-
import { PubliclistModule } from './components/publiclists/publiclist.module';
31-
import { HomeModule } from './components/home/home.module';
3218
import { AuthService } from './services/auth.service';
33-
import { ChallengeModule } from './components/challenge/challenge.module';
34-
import { DashboardModule } from './components/dashboard/dashboard.module';
19+
import { ModalComponent } from './components/utility/modal/modal.component';
20+
import { ToastComponent } from './components/utility/toast/toast.component';
21+
import { EditphasemodalComponent } from './components/challenge/challengephases/editphasemodal/editphasemodal.component';
22+
import { TermsAndConditionsModalComponent } from './components/challenge/challengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.component';
23+
24+
// import module
25+
import { SharedModule } from './shared/shared.module';
3526

3627
@NgModule({
3728
declarations: [
3829
AppComponent,
39-
PrivacyPolicyComponent,
40-
ContactComponent,
41-
GetInvolvedComponent,
42-
AboutComponent,
43-
ChallengeCreateComponent,
44-
ProfileComponent,
45-
NotFoundComponent,
46-
OurTeamComponent,
47-
AnalyticsComponent,
48-
HostAnalyticsComponent
30+
ModalComponent,
31+
ToastComponent,
32+
EditphasemodalComponent,
33+
TermsAndConditionsModalComponent
4934
],
5035
imports: [
51-
AuthModule,
52-
HomeModule,
53-
PubliclistModule,
54-
ChallengeModule,
55-
DashboardModule,
5636
BrowserModule,
5737
BrowserAnimationsModule,
5838
AppRoutingModule,
39+
SharedModule,
5940
HttpClientModule,
60-
FormsModule
41+
FroalaEditorModule.forRoot(),
42+
FroalaViewModule.forRoot(),
6143
],
6244
providers: [
6345
WindowService,
@@ -67,6 +49,7 @@ import { DashboardModule } from './components/dashboard/dashboard.module';
6749
ChallengeService,
6850
EndpointsService
6951
],
52+
schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
7053
bootstrap: [AppComponent],
7154
})
7255
export class AppModule { }
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
4+
// import component
5+
import { AboutComponent } from './about.component';
6+
7+
const routes: Routes = [
8+
{
9+
path: '',
10+
component: AboutComponent
11+
},
12+
];
13+
14+
@NgModule({
15+
imports: [RouterModule.forChild(routes)],
16+
exports: [RouterModule]
17+
})
18+
export class AboutRoutingModule { }
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
// import component
5+
import { AboutComponent } from './about.component';
6+
import { AboutRoutingModule } from './about-routing.module';
7+
8+
// import module
9+
import { SharedModule } from '../../shared/shared.module';
10+
11+
@NgModule({
12+
declarations: [
13+
AboutComponent
14+
],
15+
imports: [
16+
CommonModule,
17+
AboutRoutingModule,
18+
SharedModule
19+
],
20+
exports: [
21+
AboutComponent
22+
]
23+
})
24+
export class AboutModule { }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
4+
// import component
5+
import { AnalyticsComponent} from './analytics.component';
6+
import { HostAnalyticsComponent } from './host-analytics/host-analytics.component';
7+
8+
const routes: Routes = [
9+
{
10+
path: '',
11+
component: AnalyticsComponent,
12+
children: [
13+
{path: '', redirectTo: 'host-analytics', pathMatch: 'full'},
14+
{path: 'host-analytics', component: HostAnalyticsComponent}
15+
]
16+
},
17+
];
18+
19+
@NgModule({
20+
imports: [RouterModule.forChild(routes)],
21+
exports: [RouterModule]
22+
})
23+
export class AnalyticsRoutingModule { }
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
// import component
5+
import { AnalyticsComponent } from './analytics.component';
6+
import { HostAnalyticsComponent } from './host-analytics/host-analytics.component';
7+
8+
// import module
9+
import { SharedModule } from '../../shared/shared.module';
10+
import { AnalyticsRoutingModule } from './analytics-routing.module';
11+
12+
@NgModule({
13+
declarations: [
14+
AnalyticsComponent,
15+
HostAnalyticsComponent
16+
],
17+
imports: [
18+
CommonModule,
19+
AnalyticsRoutingModule,
20+
SharedModule
21+
],
22+
exports: [
23+
AnalyticsComponent,
24+
HostAnalyticsComponent
25+
],
26+
})
27+
export class AnalyticsModule { }

src/app/components/auth/auth-routing.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
3+
4+
// import component
35
import { AuthComponent } from './auth.component';
46
import { LoginComponent } from './login/login.component';
57
import { ResetPasswordComponent } from './reset-password/reset-password.component';
@@ -9,7 +11,7 @@ import { VerifyEmailComponent } from './verify-email/verify-email.component';
911

1012
const routes: Routes = [
1113
{
12-
path: 'auth',
14+
path: '',
1315
component: AuthComponent,
1416
children: [
1517
{path: '', redirectTo: 'login', pathMatch: 'full'},

src/app/components/auth/auth.module.ts

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
import { FormsModule } from '@angular/forms';
4-
import { RouterModule } from '@angular/router';
53

64
// import components
75
import { LoginComponent } from './login/login.component';
@@ -11,13 +9,13 @@ import { ResetPasswordComponent } from './reset-password/reset-password.componen
119
import { VerifyEmailComponent } from './verify-email/verify-email.component';
1210
import { AuthComponent } from './auth.component';
1311

14-
// import modules
15-
import { AuthRoutingModule } from './auth-routing.module';
16-
import { NavModule } from '../nav/nav.module';
17-
18-
// import services
12+
// import service
1913
import { AuthService } from '../../services/auth.service';
2014

15+
// import module
16+
import { SharedModule } from '../../shared/shared.module';
17+
import { AuthRoutingModule } from './auth-routing.module';
18+
2119

2220
@NgModule({
2321
declarations: [
@@ -30,19 +28,16 @@ import { AuthService } from '../../services/auth.service';
3028
],
3129
imports: [
3230
CommonModule,
33-
RouterModule,
3431
AuthRoutingModule,
35-
FormsModule,
36-
NavModule
32+
SharedModule
3733
],
3834
exports: [
35+
AuthComponent,
3936
LoginComponent,
4037
SignupComponent,
41-
ResetPasswordConfirmComponent,
4238
ResetPasswordComponent,
43-
VerifyEmailComponent,
44-
AuthComponent,
45-
NavModule
39+
ResetPasswordConfirmComponent,
40+
VerifyEmailComponent
4641
],
4742
providers: [
4843
AuthService
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
4+
// import component
5+
import { ChallengeCreateComponent } from './challenge-create.component';
6+
7+
const routes: Routes = [
8+
{
9+
path: '',
10+
component: ChallengeCreateComponent
11+
},
12+
];
13+
14+
@NgModule({
15+
imports: [RouterModule.forChild(routes)],
16+
exports: [RouterModule]
17+
})
18+
export class ChallengeCreateRoutingModule { }
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
// import component
5+
import { ChallengeCreateComponent } from './challenge-create.component';
6+
7+
// import module
8+
import { ChallengeCreateRoutingModule } from './challenge-create-routing.module';
9+
import { SharedModule } from '../../shared/shared.module';
10+
11+
@NgModule({
12+
declarations: [
13+
ChallengeCreateComponent
14+
],
15+
imports: [
16+
CommonModule,
17+
ChallengeCreateRoutingModule,
18+
SharedModule
19+
],
20+
exports: [
21+
ChallengeCreateComponent
22+
]
23+
})
24+
export class ChallengeCreateModule { }

0 commit comments

Comments
 (0)