I am building an Ember CLI app and want to use Heyoffline.js. I have installed this using Bower:
bower.js:
"Heyoffline": "~1.1.1"
Brocfile:
app.import('bower_components/Heyoffline/heyoffline.js');
I am then trying to load this using an initialiser, as below. However this does not seem to work - nothing happens when I go offline. There are no errors in the console. Am I loading this incorrectly? Thanks.
export default {
name: 'heyoffline',
initialize: function() {
document.addEventListener('deviceready', function () {
new Heyoffline();
}, false);
}
};
Aucun commentaire:
Enregistrer un commentaire