The user list component

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'; ...

Get Web Application Development with MEAN now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.