0

Is fbh-firebase-util compatible with aurelia?

How to use it?

fbh-firebase-util via jspm:

jspm install github:djindjic/fbh-firebase-util

Vicheanak
  • 6,444
  • 17
  • 64
  • 98

1 Answers1

1

Aurelia is just a javascript framework. Aurelia itself won't keep you from using the libraries you love. After installing a library with jspm, just import it and use it. The only trick is knowing what the library exports, but the library should provide you with some documentation.

In all likelihood, you will just need to add this line at the top of your code which uses firebase:

import firebase from 'github:djindjic/fbh-firebase-util'

If you add a dependency to your package.json

"jspm": {
    "dependencies": {
      "firebase": "github:djindjic/fbh-firebase-util@^0.1.22",

then your import line becomes

import firebase from 'firebase'

If this doesn't immediately work, please review the firebase documentation to see what the module exports. The above assumes it exports default.

Matthew James Davis
  • 12,134
  • 7
  • 61
  • 90
  • 1
    firebase shown error 404: I checked the packages.json, there's already "djindjic/fbh-firebase-util": "github:djindjic/fbh-firebase-util@^0.1.22", so i change from import firebase from 'firebase' to import firebase from 'djindjic/fbh-firebase-util' everything is working perfectly fine. Thanks – Vicheanak May 01 '15 at 13:35