Code Monkey home page Code Monkey logo

todo-ng-pouchdb's Introduction

todo-ng-pouchdb

An Example of the use of ng-pouchdb, a 4-way data-binding library, in action using a simple Ionic Todo app with a PouchDb local storage backend configured to sync with a CouchDb installation. This is a demo of offline functionality with server synchronization. And is part of my Offline data synchronization talk. Slides available at: http://zndg.tl/ng-pouchdb

You can watch me demo building a much earlier version of the app at FITC Spotlight: AngularJS in Toronto.

Installation

Node must be installed. And, you wil need to install bower globally with npm install -g bower before running bower install, to download the necessary required frontend libraries.

Run the App

You can cd into the www directory and run

npm install http-server -g
http-server -p 8080

You can then just open http://localhost:8080/index.html in a browser.

Personally I use WebStorm which has a built in server. From a JetBrains product, you can select "View...", "Open in Browser" on index.html.

The final version of this demo requires you to download and install CouchDb, which runs on port 5984. And, enable CORS.

iOS version

However, to run this as a mobile application in iOS emulator, do the following to setup :

cd todo-ng-pouchdb
npm install -g cordova ionic gulp

To run in the iPhone Simulator:

ionic platform add ios
ionic build ios
ionic emulate ios

Building Out & Updating Ionic or PouchDb

To update to a new version of Ionic, open bower.json and change the version listed there.

"ionic": "driftyco/ionic-bower#1.0.0-XXX"

After saving the update to bower.json file, run bower install.

I was a little forward thinking adding the package.json file. To continue working on this repository, adding tests, using SASS, you can

$ npm install
$ gulp install

todo-ng-pouchdb's People

Contributors

danielzen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todo-ng-pouchdb's Issues

Breaks with PoucDB V4.0.0 and newer

So far, swap the pouchdb.js for V3.6.0 is ok, V4.0.0 breaks.

V4.0.1 has some important bug fixes.

I will update after investigating in more detail if I find the cause.

Android storage data growing indefinitely

Hi,

This is a great example app but I am experiencing what I believe to be a pretty major issue.

I have run this up on my Android phone and added a couple of todo items. The replication is working well and these items have been successfully replicated to my couchdb server. The problem I am experiencing is as follows:

If I leave the app running in the online mode (live replication) and don't add any more items the apps storage data is slowing growing overtime. Eventually the data size will grow out of hand. I believe the data is increasing each time the app is checking for any changes to the CouchDB. This is happening even when the app is running minimized.

Any ideas on how this can be avoided? I really would like to build this functionality into one of my apps but with this issue I don't see it as a viable solution.

It does not support android 4.0.3

I have created a sample ionic app and replaced the www app. the apk file thus generated works fine android 4.1 or later but when i tried to install it in android 4.0.3 it throws error like below stated

"There is a problem parsing the package"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.