You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

171 lines
6.7 KiB
TypeScript

5 years ago
import {BrowserModule, DomSanitizer} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {RouterModule, Routes} from '@angular/router';
import {SocketIoConfig, SocketIoModule} from 'ngx-socket-io';
import {HttpModule} from '@angular/http';
5 years ago
import {AppComponent} from './app.component';
import {RegisterComponent} from './components/register/register.component';
import {LoginComponent} from './components/login/login.component';
import {ChatComponent} from './components/chat/chat.component';
import {FriendsComponent} from './components/social/friends/friends.component';
import {FeedComponent} from './components/feed/feed.component';
import {HomeComponent} from './components/home/home.component';
import {SocialComponent} from './components/social/social.component';
import {DialogCreateGroupComponent, GroupsComponent} from './components/social/groups/groups.component';
import {DialogCreateEventComponent, GroupComponent} from './components/group/group.component';
import {ChatmanagerComponent} from './components/chatmanager/chatmanager.component';
import {ChatlistComponent} from './components/chatlist/chatlist.component';
import {PostlistComponent} from './components/feed/postlist/postlist.component';
import {HttpClientModule} from '@angular/common/http';
import {ProfileComponent} from './components/profile/profile.component';
import {DialogFileUploadComponent} from './components/profile/fileUpload/fileUpload.component';
import {DialogGroupFileUploadComponent} from './components/group/fileUpload/fileUpload.component';
5 years ago
import {ImprintComponent} from './components/imprint/imprint.component';
import {AboutComponent} from './components/about/about.component';
import {ChatcontactsComponent} from './components/chatmanager/chatcontacts/chatcontacts.component';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatTableModule} from '@angular/material/table';
5 years ago
import {InfiniteScrollModule} from 'ngx-infinite-scroll';
import {UserlistComponent} from './components/userlist/userlist.component';
5 years ago
import {MatSliderModule} from '@angular/material/slider';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input';
5 years ago
import {MatIconModule, MatIconRegistry} from '@angular/material/icon';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatSidenavModule} from '@angular/material/sidenav';
import {MatTabsModule} from '@angular/material/tabs';
import {MatCardModule} from '@angular/material/card';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
5 years ago
import {MatSelectModule} from '@angular/material/select';
import {MatCheckboxModule} from '@angular/material/checkbox';
5 years ago
import {OverlayModule} from '@angular/cdk/overlay';
5 years ago
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {MatMenuModule} from '@angular/material/menu';
import {MatRippleModule} from '@angular/material/core';
import {MatBadgeModule} from '@angular/material/badge';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
5 years ago
import {FlexLayoutModule} from '@angular/flex-layout';
import {MainNavigationComponent} from './components/main-navigation/main-navigation.component';
import {LayoutModule} from '@angular/cdk/layout';
import {MatButtonModule} from '@angular/material/button';
import {MatListModule} from '@angular/material/list';
import {MatSortModule} from '@angular/material/sort';
5 years ago
import {SearchComponent} from './components/search/search.component';
5 years ago
import {MatDialogModule} from '@angular/material/dialog';
import {MatTooltipModule} from '@angular/material/tooltip';
import {MatExpansionModule} from '@angular/material/expansion';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatNativeDateModule, MatProgressBarModule} from '@angular/material/';
import {MatSnackBarModule} from '@angular/material/snack-bar';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import {LightboxModule} from 'ngx-lightbox';
5 years ago
5 years ago
const config: SocketIoConfig = {url: 'http://localhost:4444', options: {}};
const appRoutes: Routes = [
5 years ago
{path: '', component: HomeComponent},
{path: 'profile/:id', component: ProfileComponent},
{path: 'group/:id', component: GroupComponent},
{path: 'login', component: LoginComponent},
{path: 'register', component: RegisterComponent},
{path: 'about', component: AboutComponent},
{path: 'imprint', component: ImprintComponent},
];
@NgModule({
declarations: [
AppComponent,
RegisterComponent,
LoginComponent,
ChatComponent,
FriendsComponent,
FeedComponent,
HomeComponent,
SocialComponent,
GroupsComponent,
ChatmanagerComponent,
ChatlistComponent,
5 years ago
ChatcontactsComponent,
PostlistComponent,
ImprintComponent,
AboutComponent,
ProfileComponent,
MainNavigationComponent,
SearchComponent,
5 years ago
DialogCreateGroupComponent,
GroupComponent,
DialogCreateEventComponent,
UserlistComponent,
DialogFileUploadComponent,
DialogGroupFileUploadComponent,
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
SocketIoModule.forRoot(config),
HttpClientModule,
InfiniteScrollModule,
MatDatepickerModule,
MatNativeDateModule,
RouterModule.forRoot(
appRoutes
),
MatIconModule,
BrowserAnimationsModule,
MatSliderModule,
MatFormFieldModule,
MatInputModule,
ReactiveFormsModule,
MatToolbarModule,
MatSidenavModule,
FlexLayoutModule,
MatTabsModule,
LayoutModule,
MatButtonModule,
MatListModule,
MatCardModule,
5 years ago
MatButtonToggleModule,
MatSelectModule,
5 years ago
MatCheckboxModule,
OverlayModule,
MatSlideToggleModule,
MatMenuModule,
MatRippleModule,
MatTableModule,
MatSortModule,
MatBadgeModule,
5 years ago
MatProgressSpinnerModule,
MatDialogModule,
MatTooltipModule,
MatExpansionModule,
MatDatepickerModule,
MatSnackBarModule,
MatProgressBarModule,
LightboxModule,
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
],
entryComponents: [
DialogCreateGroupComponent,
DialogCreateEventComponent,
DialogFileUploadComponent,
DialogGroupFileUploadComponent
],
providers: [],
bootstrap: [AppComponent]
})
5 years ago
export class AppModule {
constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
iconRegistry.addSvgIcon(
'logo', sanitizer.bypassSecurityTrustResourceUrl('assets/images/gv-logo-white.svg'));
iconRegistry.addSvgIcon(
'logo_green', sanitizer.bypassSecurityTrustResourceUrl('assets/images/gv-logo-flat.svg'));
5 years ago
}
5 years ago
}