import { BrowserModule } from '@angular/platform-browser' ; import { NgModule } from '@angular/core' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { MatButtonModule , MatIconModule , MatListModule , MatMenuModule } from '@angular/material' ; import { RouterModule , Routes } from '@angular/router' ; import { FormsModule } from '@angular/forms' ; import { ChatsService } from '../services/chats.service' ; import { ChatItemComponent } from './components/chat-item/chat-item.component' ; import { ChatsComponent } from './containers/chats/chats.component' ; import { ChatsListComponent } from './components/chats-list/chats-list.component' ; import { SharedModule } from '../shared/shared.module' ; import { NgxSelectableListModule } from 'ngx-selectable-list' ; import { AuthGuard } from '../login/services/auth.guard' ; const routes = [ { path : '' , redirectTo : 'chats' , pathMatch : 'full' } , { path : 'chats' , canActivate : [ AuthGuard ] , component : ChatsComponent } , ] ; @ NgModule ( { declarations : [ ChatsComponent , ChatsListComponent , ChatItemComponent , ] , imports : [ BrowserModule , MatMenuModule , MatIconModule , MatButtonModule , MatListModule , BrowserAnimationsModule , RouterModule . forChild ( routes ) , FormsModule , SharedModule , NgxSelectableListModule , ] , providers : [ ChatsService , ] , } ) export class ChatsListerModule { }