Now that we have all the necessary data types and services, we can get back to our application's components. Looking back at the app
component, a good thing would be to start with the chat
component. Create a new file called public/src/chat/chat.component.ts
and add the following imports:
import { Component } from 'angular2/core'; import { RouteConfig, RouterOutlet } from 'angular2/router'; import { ChatService } from '../services/chat.service'; import { ThreadListComponent } from '../thread/thread-list.component'; import { MessageListComponent } from '../message/message-list.component'; import { MessageFormComponent } from '../message/message-form.component'; import { UserListComponent } from '../user/user-list.component'; import { ChatHelpComponent } from './chat-help.component';
After we have imported all our required modules, we can actually implement our component:
@RouteConfig([ { path: '/', as: 'ThreadMessagesDefault', component: ChatHelpComponent, useAsDefault...