Angular2 Interfacing with External JS E.g. PouchDB


This blog demonstrates how to interface Angular2 TypeScript with JavaScript.

PouchDB is used as an example JavaScript library.

How to setup a PouchDB in JavaScript

How to setup PouchDB in general is simple as explained here:

Add PouchDB to index.html

<script src=""></script>

This one line of code sets up a database called “dbName”;

var db = new PouchDB('dbname');

Simple as that, now it’s possible to call db.put(),''') db.addDocs()  etc.

Diving Straight into TypeScript and PouchDB

Add PouchDB to your application

Continue reading “Angular2 Interfacing with External JS E.g. PouchDB”