Wednesday, 15 June 2011

javascript - offline-firebase does not work EmberFire (and ember-cli) -



javascript - offline-firebase does not work EmberFire (and ember-cli) -

when seek utilize offline-firebase emberfire, these errors (and nil gets saved firebase):

adapters/application.js

export default ds.firebaseadapter.extend({ firebase: new offlinefirebase('https://woot.firebaseio.com/quiz').on('value', function(snapshot){ console.log(snapshot); }, undefined, undefined, true) });

app.js

offlinefirebase.restore();

index.html

<script src="cordova.js"></script> <script src="js/firebase-debug.js"></script> <script src="js/offlinefirebase.js"></script> <script src="assets/vendor.js"></script> <script src="assets/woot-prototype.js"></script>

controllers/index.js

export default ember.arraycontroller.extend({ init: function() { this.set('user', ember.object.create()); }, actions: { getuser: function(){ var newuser = this.store.createrecord('user', { email: this.get('user.email'), name: this.get('user.name') }); console.log(newuser); newuser.save(); } } });

is offline-firebase problem or doing wrong? :) https://github.com/yeldarby/offline-firebase/issues/6

javascript ember.js firebase offlineapps emberfire

No comments:

Post a Comment