I have an ember-cli project. I used bower to install fastclick and added it to my broc file.
Now I'm trying to initialize it. In my app.js file, I added:
import FastClick from 'bower_components/fastclick/lib/fastclick';
But this gives me an error in the console: "Uncaught TypeError: Unable to read the" default "property from undefined". The inspector shows the following generated code:
["ember","ember/resolver","ember/load-initializers","bower_components/fastclick/lib/fastclick","exports"], function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) { "use strict"; var Ember = __dependency1__["default"]; var Resolver = __dependency2__["default"]; var loadInitializers = __dependency3__["default"]; var FastClick = __dependency4__["default"];
I assume the problem is that fastclick is not compatible with the ES6 bootloader that uses ember-cli. I don't have requirejs, so how can I install fastclick in my project? Docs are at https://github.com/ftlabs/fastclick .
I also tried adding this to index.html, but this has no effect when I create an iOS application:
$(function() { FastClick.attach(document.body); });
source share