I would like to ask what is the best practice for initialization firebase sdk in ember.js without emberfire
My solution is :
1) add to index.html at the end of <body>
before ember javascripts
<script src="http://ift.tt/24gI965"></script>
2) create application instance initializer
export function initialize(appInstance) {
var config = {
apiKey: "xxx",
authDomain: "xxx",
databaseURL: "xxx",
storageBucket: "xxx",
};
firebase.initializeApp(config);
}
export default {
name: 'firebase-init',
initialize
};
Aucun commentaire:
Enregistrer un commentaire