janpio / ionic-epubjs

Ionic 3 app using Epub.js
https://janpio.github.io/ionic-epubjs/
31 stars 20 forks source link

ionic-epubjs

Sample project of how to use Epub.js in an Ionic 3 app.

How Epub.js is integrated

As just natively importing Epub.js after installing it via npm unfortunately doesn't work, I copied over the build directory of the npm package of epubjs from /node_modules/epubjs to /src/assets/epubjs and included epubjs.min.js in index.html. That way the ePub object is globally available and can be used in Typescript after declaring it with declare var ePub: any;.

Functionality

Development

  1. Clone the repo
  2. Run npm install
  3. Run ionic cordova prepare
  4. Run ionic serve or ionic cordova run android|ios

Information + Resources

Related projects