Reputation: 5581
I'm using SystemJS to load all my dependencies. I'm using TypeScript but I something really odd is happening. Firebase is being imported but I can't seeem to call `new Firebase("myUrl") on it.
Here's my map property of SystemJS
map: {
'rxjs': '/node_modules/rxjs',
'lodash': '/node_modules/lodash/index.js',
'handlebars': '/node_modules/handlebars/dist/handlebars.min.js',
'firebase': '/node_modules/firebase/lib/firebase-web.js'
}
Unless I'm missing something I can't seem to instantiate a Firebase instance...
new Firebase("myUrl")
throws a Firebase is not a function
but the object isn't undefined
I upgraded to SystemJS 0.19.6 and Firebase 2.3.2
Upvotes: 1
Views: 385
Reputation: 119
My SystemJs:
'firebase': 'npm:firebase/firebase.js',
And there is my code:
import 'firebase';
let config = {
apiKey: ,
authDomain:
databaseURL: ',
storageBucket: ,
messagingSenderId:
};
firebase.initializeApp(config);
It is working well with SystemJs.
Upvotes: 1