{"id":19326761,"url":"https://github.com/sroehrl/angularjs-neoan-flatdb","last_synced_at":"2026-05-07T14:32:27.654Z","repository":{"id":96988328,"uuid":"149939923","full_name":"sroehrl/angularjs-neoan-flatDb","owner":"sroehrl","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-29T19:30:25.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-06T07:12:34.566Z","etag":null,"topics":["angularjs","database","offline-first"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sroehrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-23T01:58:39.000Z","updated_at":"2018-09-29T19:30:27.000Z","dependencies_parsed_at":"2023-03-13T16:20:34.159Z","dependency_job_id":null,"html_url":"https://github.com/sroehrl/angularjs-neoan-flatDb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sroehrl%2Fangularjs-neoan-flatDb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sroehrl%2Fangularjs-neoan-flatDb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sroehrl%2Fangularjs-neoan-flatDb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sroehrl%2Fangularjs-neoan-flatDb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sroehrl","download_url":"https://codeload.github.com/sroehrl/angularjs-neoan-flatDb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427507,"owners_count":19799509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angularjs","database","offline-first"],"created_at":"2024-11-10T02:14:46.329Z","updated_at":"2026-05-07T14:32:22.631Z","avatar_url":"https://github.com/sroehrl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angularjs-neoan-flatDb\n\nDeployable, indexed, offline-first Database for AngularJS\n\nKeeps the necessary abstraction-level for your apps when dealing with packaged, \noffline applications while providing queryable data.\n\n\u003ebower install https://github.com/sroehrl/angularjs-neoan-flatDb.git --save\n\n###  [AngularJS](https://angularjs.org) module\n\n```\nangular.module('your-app',['neoan.nfdb']);\n```\n\n## Usage\n\n\u003eThe usage depends on your type of application and differs greatly.\n\u003eThis is just a very basic demonstration based on a common use-case.\n\n### In JS\n\u003e! Inject $db !\n\n```JS\n// Connect to a destination (the file-ending .nfdb is optional). \n// A JSON format is required\n\n$db.connect('data.nfdb').then(function(dbService){\n    \n    // You can assign the service to the current scope\n    \n    $scope.db = dbService;\n    \n    // Query data by object\n    \n    let results = $scope.db.query({inHere:{someKey:'someValue'}});        \n            \n     // The property attach() is provided to all arrays and objects to easily \n     // add entries.\n     \n     let newUser = {name:'Charlie', gender:'male'};\n     results.forEach(function(item){\n         item.attach(newUser).then(function(user){\n              // 'user' contains attach-functions, its value as well as \n              // an id (_nId, (UUID)). Adding the member _nId in attach() enables \n              // the usage of own ids\n         })\n     });\n     \n     // To create or update data, to create a level-1 store \n     // or to create an indexed object prior to any attachments, use put()\n     // e.g. creating entity for users\n     $scope.db.put({'users':[]}).then(function(users){\n         // 'users' contains attach-functions, an empty array as well as \n         // an id (_nId, (UUID)). Adding the member _nId in put() enables \n         // the usage of own ids\n         \n     })\n});\n```\n\n### In HTML\n\n```HTML\n\u003cbutton ng-click=\"charlies=db.query({blogs:{author:'Charlie'})\"\u003e\n    Get Charlie's blog posts! \n\u003c/button\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsroehrl%2Fangularjs-neoan-flatdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsroehrl%2Fangularjs-neoan-flatdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsroehrl%2Fangularjs-neoan-flatdb/lists"}