EmberFire is the officially supported adapter for using Firebase with Ember Data.
IMPORTANT NOTICE: If you require embedded records, there is a bug in Ember Data that prevents them from working in 1.13.0 - 1.13.5
, you will need to use 1.13.6
or higher
Join the Firebase + Ember Google Group to ask technical questions, share apps you've built, and chat with other developers in the community.
Please consult this table when selecting your version of EmberFire:
Ember Data | EmberFire |
---|---|
beta.12 - beta.18 | 1.4.x |
beta.19 | none |
1.13+ | 1.5.x |
canary | master |
To install the master
branch, use ember install firebase/emberfire#master
To install EmberFire as an addon with ember-cli, run the following command within your app's directory:
$ ember install emberfire
This will create a app/adapters/application.js
. All you need to do is update your Firebase database url in config/environment.js
:
// config/environment.js
var ENV = {
// ...
firebase: 'https://YOUR-FIREBASE-NAME.firebaseio.com/',
// ...
Your Firebase data will now be synced with the Ember Data store. For detailed EmberFire documentation, check out the quickstart or guide in the Firebase docs.
EmberFire also works without ember-cli. See the Firebase documentation for instructions on getting started.
If you'd like to contribute to EmberFire, run the following commands to get your environment set up:
git clone
this repositorynpm install -g ember-cli bower gulp phantomjs
npm install
bower install
From your emberfire
workdir
npm link
npm prune --production
(removes dev dependencies, these can trip you up!)
From your app workdir
-
npm link emberfire
-
Update your
package.json
so thatemberfire
is indevDependencies
and is set to version0.0.0
"devDependencies": { "emberfire": "0.0.0"
ember test
ORember test --server
ember try <scenario>
where<scenario>
is one of the scenarios inconfig/ember-try.js
Example:
ember try ember-data-canary
ember server
- Visit your app at http://localhost:4200.