The user list component will give us the ability to search for users and start a new conversation with them. We will need to display a list of users and filter them by a search criterion. Also, by clicking on a user from the list, a new conversation thread should open. All this should be fairly simple to implement. Let's start by creating the component file. Create a new file called public/src/user/user.component.ts
, with the following base structure:
import { Component } from 'angular2/core'; import { Router } from 'angular2/router' import { Subject } from 'rxjs/Subject'; import { ReplaySubject } from 'rxjs/Subject/ReplaySubject'; import { UserService } from '../services/user.service'; import { ThreadService } from '../services/thread.service'; import { User } from '../datatypes/user'; @Component({ selector: 'user-list', template: `` }) export class UserListComponent { public users: Array<User>; public filteredUsers: Array<User>; public...