Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F119810724
app.module.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 29, 12:50
Size
2 KB
Mime Type
text/x-java
Expires
Tue, Jul 1, 12:50 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27074465
Attached To
R8244 Eawag_Swing_Weight_Elicitation
app.module.ts
View Options
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import { RouterModule, Routes } from '@angular/router';
import { AppComponent } from './app.component';
import { ProfileComponent } from './profile/profile.component';
import { LoginComponent } from './login/login.component';
import { RegisterComponent } from './register/register.component';
import { HomeComponent } from './home/home.component';
import { AuthenticationService } from './authentication.service';
import { AuthGuardService } from './auth-guard.service';
import { AdminComponent } from './admin/admin.component';
import { ResultsComponent } from './results/results.component';
import { SurveylistComponent } from './surveylist/surveylist.component';
import { NewsurveyComponent } from './newsurvey/newsurvey.component';
import { HierarchyComponent } from './hierarchy/hierarchy.component';
import { RespondentsComponent } from './respondents/respondents.component';
import { ResultComponent } from './result/result.component';
import { SurveyV1Module } from './survey-v1/survey-v1.module';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { SurveyV2Module } from './survey-v2/survey-v2.module';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
const routes: Routes = [
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{ path: 'profile', component: ProfileComponent, canActivate: [AuthGuardService] },
{ path: 'admin', component: AdminComponent, canActivate: [AuthGuardService] },
{ path: 'results', component: ResultsComponent , canActivate: [AuthGuardService]},
{ path: 'surveylist', component: SurveylistComponent , canActivate: [AuthGuardService]},
{ path: 'newsurvey', component: NewsurveyComponent , canActivate: [AuthGuardService]},
{ path: 'respondents', component: RespondentsComponent , canActivate: [AuthGuardService]},
{ path: 'result', component: ResultComponent , canActivate: [AuthGuardService]},
{ path: 'hierarchy', component: HierarchyComponent , canActivate: [AuthGuardService]},
{ path: '**', component: PageNotFoundComponent }
];
@NgModule({
declarations: [
AppComponent,
ProfileComponent,
LoginComponent,
RegisterComponent,
HomeComponent,
AdminComponent,
ResultsComponent,
SurveylistComponent,
NewsurveyComponent,
HierarchyComponent,
RespondentsComponent,
ResultComponent,
PageNotFoundComponent
],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
RouterModule.forRoot(routes),
SurveyV1Module,
SurveyV2Module
],
providers: [
AuthenticationService,
AuthGuardService,
{provide: LocationStrategy, useClass: HashLocationStrategy}
],
bootstrap: [AppComponent]
})
export class AppModule { }
Event Timeline
Log In to Comment