Skip to content

Instantly share code, notes, and snippets.

@wizlee
Last active July 16, 2021 13:55
Show Gist options
  • Save wizlee/2c5c7f466d036c4fb9d0bfc83f784e6c to your computer and use it in GitHub Desktop.
Save wizlee/2c5c7f466d036c4fb9d0bfc83f784e6c to your computer and use it in GitHub Desktop.
angular-marketplace-totorial-chat.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from "@angular/router";
import { InboxComponent } from './inbox.component';
import { CometChatConversationComponent } from './comet-chat-conversation.component';
import { CometChatConversationListWithMessages } from "@cometChatComponents/Chats/CometChat-conversation-list-with-messages/cometchat-conversation-list-with-messages.module";
import { CometChatMessages } from "@cometChatComponents/Messages/CometChat-messages/cometchat-messages.module";
import { AuthGuard } from "../account/auth.guard";
import { UserMessageComponent } from './user-message.component';
@NgModule({
declarations: [InboxComponent, CometChatConversationComponent, UserMessageComponent],
imports: [
CommonModule,
RouterModule.forChild([
{
path: "conversation",
component: CometChatConversationComponent,
canActivate: [AuthGuard],
},
]),
CometChatConversationListWithMessages,
CometChatMessages,
],
exports: [InboxComponent, UserMessageComponent],
})
export class ChatModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment