|
1 | | -AngularFire |
2 | | -=========== |
3 | | -AngularFire is an officially supported [AngularJS](http://angularjs.org/) binding |
4 | | -for [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=angularFire). |
5 | | -Firebase is a full backend so you don't need servers to build your Angular app! |
6 | 1 |
|
7 | | -*Please visit the |
8 | | -[Firebase + Angular Quickstart guide](https://www.firebase.com/quickstart/angularjs.html) |
9 | | -for more information*. |
| 2 | +# AngularFire |
10 | 3 |
|
11 | | -We also have a [tutorial](https://www.firebase.com/tutorial/#tutorial/angular/0), |
12 | | -[documentation](https://www.firebase.com/docs/angular/index.html) and an |
13 | | -[API reference](https://www.firebase.com/docs/angular/reference.html). |
| 4 | +[](https://travis-ci.org/firebase/angularfire) |
| 5 | +[](http://badge.fury.io/gh/firebase%2Fangularfire) |
14 | 6 |
|
15 | | -Join our [Firebase + Angular Google Group](https://groups.google.com/forum/#!forum/firebase-angular) to ask questions, provide feedback, and share apps you've built with Firebase and Angular. |
| 7 | +AngularFire is the officially supported [AngularJS](http://angularjs.org/) binding |
| 8 | +for [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=angularfire). |
| 9 | +Firebase is a full backend so you don't need servers to build your Angular app. AngularFire provides you with the `$firebase` service which allows you to easily keep your `$scope` variables in sync with your Firebase backend. |
16 | 10 |
|
17 | | -Development |
18 | | ------------ |
19 | | -[](https://travis-ci.org/firebase/angularFire) |
20 | | -[](http://badge.fury.io/bo/angularfire) |
21 | | -[](http://gruntjs.com/) |
| 11 | +## Downloading AngularFire |
22 | 12 |
|
23 | | -If you'd like to hack on AngularFire itself, you'll need |
24 | | -[node.js](http://nodejs.org/download/) and [Bower](http://bower.io). |
| 13 | +In order to use AngularFire in your project, you need to include the following files in your HTML: |
25 | 14 |
|
26 | | -You can also start hacking on AngularFire in a matter of seconds on |
27 | | -[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=angularFire&utm_medium=hackonnitrous) |
| 15 | +```html |
| 16 | +<!-- AngularJS --> |
| 17 | +<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"></script> |
| 18 | + |
| 19 | +<!-- Firebase --> |
| 20 | +<script src="https://cdn.firebase.com/js/client/1.0.18/firebase.js"></script> |
| 21 | + |
| 22 | +<!-- AngularFire --> |
| 23 | +<script src="https://cdn.firebase.com/libs/angularfire/0.8.0/angularfire.min.js"></script> |
| 24 | +``` |
28 | 25 |
|
29 | | -[](https://www.nitrous.io/hack_button?source=embed&runtime=nodejs&repo=firebase%2FangularFire&file_to_open=README.md) |
| 26 | +Use the URL above to download both the minified and non-minified versions of AngularFire from the Firebase CDN. You can also download them from the root of this GitHub repository. [Firebase](https://www.firebase.com/docs/web-quickstart.html?utm_medium=web&utm_source=angularfire) and [AngularJS](http://angularjs.org/) can be downloaded directly from their respective websites. |
31 | 27 |
|
32 | | -To get your dev environment set up, run the following commands: |
| 28 | +You can also install AngularFire via Bower and the dependencies will be downloaded automatically: |
33 | 29 |
|
34 | 30 | ```bash |
35 | | -git clone https://github.com/firebase/angularfire.git # clones this repository |
36 | | -npm install # installs node dependencies |
37 | | -bower install # installs JavaScript dependencies |
38 | | -grunt install # installs selenium server for e2e tests |
| 31 | +$ bower install angularfire --save |
39 | 32 | ``` |
40 | 33 |
|
41 | | -Use grunt to build and test the code: |
| 34 | +Once you've included AngularFire and its dependencies into your project, you will have access to the `$firebase` service. |
42 | 35 |
|
43 | | -```bash |
44 | | -# Validates source with jshint, minifies source, and then runs unit and e2e tests |
45 | | -grunt |
| 36 | +You can also start hacking on AngularFire in a matter of seconds on |
| 37 | +[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=angularfire&utm_medium=hackonnitrous): |
46 | 38 |
|
47 | | -# Watches for changes and runs only unit tests after each change |
48 | | -grunt watch |
| 39 | +[](https://www.nitrous.io/hack_button?source=embed&runtime=nodejs&repo=firebase%2Fangularfire&file_to_open=README.md) |
49 | 41 |
|
50 | | -# Runs all tests |
51 | | -grunt test |
| 42 | +## Getting Started with Firebase |
52 | 43 |
|
53 | | -# Minifies source |
54 | | -grunt build |
55 | | -``` |
| 44 | +AngularFire requires Firebase in order to sync data. You can [sign up here](https://www.firebase.com/docs/web-quickstart.html?utm_medium=web&utm_source=angularfire) for a free account. |
56 | 45 |
|
57 | | -In addition to the automated test suite, there is an additional manual test suite that ensures that the |
58 | | -$firebaseSimpleLogin service is working properly with auth providers. These tests are run using karma with the following command: |
| 46 | +## Documentation |
| 47 | + |
| 48 | +The Firebase docs have a [quickstart](https://www.firebase.com/docs/web/bindings/angular/quickstart.html), [guide](https://www.firebase.com/docs/web/bindings/angular/guide.html), and [full API reference](https://www.firebase.com/docs/web/bindings/angular/api.html) for AngularFire. |
| 49 | + |
| 50 | +We also have a [tutorial](https://www.firebase.com/tutorial/#tutorial/angular/0) to help you get started with AngularFire. |
| 51 | + |
| 52 | +Join our [Firebase + Angular Google Group](https://groups.google.com/forum/#!forum/firebase-angular) to ask questions, provide feedback, and share apps you've built with Firebase and Angular. |
| 53 | + |
| 54 | +## Contributing |
| 55 | + |
| 56 | +If you'd like to contribute to AngularFire, you'll need to run the following commands to get your environment set up: |
59 | 57 |
|
60 | 58 | ```bash |
61 | | -karma start tests/manual_karma.conf.js |
| 59 | +$ git clone https://github.com/firebase/angularfire.git |
| 60 | +$ cd angularfire # go to the angularfire directory |
| 61 | +$ npm install -g grunt # globally install grunt task runner |
| 62 | +$ npm install -g bower # globally install Bower package manager |
| 63 | +$ npm install # install local npm build / test dependencies |
| 64 | +$ bower install # install local JavaScript dependencies |
| 65 | +$ grunt install # install Selenium server for end-to-end tests |
| 66 | +$ grunt watch # watch for source file changes |
62 | 67 | ``` |
63 | 68 |
|
64 | | -Note that you must click "Close this window", login to Twitter, etc. when |
65 | | -prompted in order for these tests to complete successfully. |
| 69 | +`grunt watch` will watch for changes in the `/src/` directory and lint, concatenate, and minify the source files when a change occurs. The output files - `angularfire.js` and `angularfire.min.js` - are written to the `/dist/` directory. `grunt watch` will also re-run the unit tests every time you update any source files. |
| 70 | + |
| 71 | +You can run the entire test suite via the command line using `grunt test`. To only run the unit tests, run `grunt test:unit`. To only run the end-to-end [Protractor](https://github.com/angular/protractor/) tests, run `grunt test:e2e`. |
66 | 72 |
|
67 | | -License |
68 | | -------- |
69 | | -[MIT](http://firebase.mit-license.org). |
| 73 | +In addition to the automated test suite, there is an additional manual test suite that ensures that the `$firebaseSimpleLogin` service is working properly with the authentication providers. These tests can be run with `grunt test:manual`. Note that you must click "Close this window", login to Twitter, etc. when prompted in order for these tests to complete successfully. |
0 commit comments