Running the app

Open up two command line interfaces/terminals. In both of them, navigate to the project directory. Run node server.js to start the server in one. Run ng serve in the other to serve the Angular 2 app.

Open up the browser and go to localhost:4200.

In this simple users app, we can perform all CRUD operations. We can create new users, get users, delete users, and update the state of users.

By default, a newly added user's active state is false. That can be changed by clicking on the change state button.

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.