Extending the example with the ability to use persistencejs to add entities to an offline database using Angular.js