mardi 21 juin 2016

Firebase() object not defined?

I'm working on an emberjs project for work and am currently trying to implement a button which will clear my firebase database when click. I planned to do that using the remove() function of a Firebase object. However, when I run ember server I get an error saying Firebase is not defined. I have added the config code to config/environment.js. What am I missing?

Edit: Here is the code. I'm not sure if it would accomplish the task that I want since I cannot test it due to error described above:

import Ember from 'ember';

export default Ember.Controller.extend({
    actions: {
        clear() {
            var ref = new Firebase('http://ift.tt/28KZ4IH');

        ref.remove();   

        }       
    }
});




Aucun commentaire:

Enregistrer un commentaire