Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nowzoo/nowzoo.firebase.utils
An Angular module with utilities for working with Firebase and angularfire.
https://github.com/nowzoo/nowzoo.firebase.utils
Last synced: 11 days ago
JSON representation
An Angular module with utilities for working with Firebase and angularfire.
- Host: GitHub
- URL: https://github.com/nowzoo/nowzoo.firebase.utils
- Owner: nowzoo
- License: mit
- Created: 2016-03-03T21:30:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-05-13T17:35:57.000Z (over 8 years ago)
- Last Synced: 2024-10-10T11:48:54.415Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NowZoo Firebase Utilities
An [Angular](https://angularjs.org) module with
utilities for working with [Firebase](https://www.firebase.com/) and
[angularfire](https://github.com/firebase/angularfire).- [Installation](#user-content-installation)
- [Usage](#user-content-usage)
- [API](#user-content-api)## Installation
```
bower install nowzoo-firebase-utils --save
```## Usage
In your HTML...:
```
//dependencies...//nowzoo-firebase-utils...
```
In your app...
```
//declare the dependency...
angular.module('my.app', ['firebase', 'nowzoo.firebase.utils']);//set the application reference with a URL...
angular.module('my.app')
.run(function(firebaseUtilities){
firebaseUtilities.setApplicationReference('https://.firebaseio.com/')
});angular.module('my.app')
.controller('MyController', function($scope, firebaseUtilities){
$scope.options = firebaseUtilities.getObject('options');
});
```## API
```
//Set the application reference with a url...
firebaseUtilities.setApplicationReference(url);//Get the application reference...
firebaseUtilities.getApplicationReference ();//Get a $firebaseAuth object...
firebaseUtilities.getApplicationAuth();//Get a child firebase reference from the arguments
firebaseUtilities.childReference(path1, ...);//Get a $firebaseObject from the arguments
firebaseUtilities.getObject(path1, ...);//Get a $firebaseObject from a firebase ref
firebaseUtilities.getRefObject(ref);//Get a $firebaseArray from the args
firebaseUtilities.getArray(path1, ...);//Get a $firebaseArray from a firebase ref...
firebaseUtilities.getRefArray(ref);```