Skip to content

magori/ngDexieAdmin

Repository files navigation

ngDexieAdmin

A administration interface for dexie. You can read, delete, edit, dump, and search data in tables.

The interface is made with Bootstrap 3, UI Bootstrap and fontawesome

You can try the demo on plunker.

By default only the index are display but you can display other data by configurations(TODO).

Requirements

The module doesn't include dexie and other librarys, but it is included in it's bower dependencies.

Installation

Install via bower

bower install ng-dexie-admin --save

Initialize

// Creat the db where you want.
var db = new Dexie("MyDatabases");
 db.version(1).stores({
  friends: "++id, name, age, isCloseFriend, contact.phone ",
  notes: "++id, title, date, *items",
  noLoadAction: "++id"
});

// require module in your app.
var app = angular.module('exampleApp', ['ng.dexieadmin'])
          .service('ngDexieAdminConfig', function () {
            return {
              getDb : function () {
                return db;
              };
            }
          });

Then include the libs, bootstrap, ui-bootstrap, fontawsome, jsoneditor, and ngEditor(ng-editor) in your html (you can also use the minified versions)

  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
  <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
  <link rel="stylesheet" href="bower_components/font-awesome-animation/dist/font-awesome-animation.css" />
  <link rel="stylesheet" href="bower_components/jsoneditor/dist/jsoneditor.css" />
  ....
  <script src="bower_components/dexie/dist/dexie.min.js"></script> 
  <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
  <script src="bower_components/jsoneditor/dist/jsoneditor.js"></script>
  <script src="bower_components/ng-jsoneditor/ng-jsoneditor.js"></script>
  <script src="bower_components/ng-dexie-admin/dist/ngDexieAdmin.js"></script>

About

A administration interface for dexie using Angular

Resources

License

Stars

Watchers

Forks

Packages

No packages published