Skip to content

Instantly share code, notes, and snippets.

View hayatoShingu's full-sized avatar

Alessandro Venezia hayatoShingu

View GitHub Profile
@hayatoShingu
hayatoShingu / angularJS_lawnchair_wrapper.js
Last active November 8, 2018 08:44
It wraps Lawnchair as a provider, allowing you to set global configuration before your dependencies are getting injected
//inspired by https://github.com/wspringer/angular-pouchdb
//lawnchar simple wrapper
//
//It wraps Lawnchair as a provider, allowing you to set global configuration before your
//dependencies are getting injected
//
//It uses $q-based promises instead of callbacks: db.get({...}) will return a promise with the results,
//and no longer accepts a callback as the last parameter.
//The same goes for all other operations that normally required callbacks.
//