Company
Date Published
Author
Nic Raboy, Developer Advocate, Couchbase
Word count
2274
Language
English
Hacker News points
None

Summary

AngularJS 1.0 was replaced by Angular 2, which is now being used to create a simple web application that syncs data using PouchDB and Couchbase Sync Gateway. The project requires Node.js 4.0+, Angular 2 CLI, Typings, and Couchbase Sync Gateway. To configure the Sync Gateway, a configuration file was created with basic settings for the database and CORS. An Angular 2 service provider was created to maintain data, which includes methods for syncing, fetching, and updating documents. The provider is imported into the application's @NgModule block. The application can be tested by running `ng serve` and accessing the project at http://localhost:4200.