IE11 ReferenceError: 'Promise' is undefined
This error occurs for me in IE11.
ReferenceError: 'Promise' is undefined at create (https://dev7.atomiclearning.com/static/js_apps/main/node_modules/angular-flickity/dist/angular-flickity.js:161:14) at Anonymous function (https://dev7.atomiclearning.com/static/js_apps/main/node_modules/angular-flickity/dist/angular-flickity.js:948:14) ...
Research indicates that the module might rely on Promise, which is not supported by IE11. Was it intended that a polyfill be used? Why wasn't $q used instead?
I've added a polyfill for Promises:
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>
The page loads extremely slowly, though, and the slide animation is also very slow and jerky. Possibly related is the fact that the demos don't work in IE.
Hey @isherwood, when this was being built IE was not a target browser. The core Flickity library does support IE10+ so IE support would be a good addition.
I've recently started a new role so my time is extremely tight right now so I can't say if/when I could refactor this. :/ More than open to PRs though if the polyfill isn't cutting it for you.
I completely understand. Not to derail anyone, but I ended up writing a simple directive that is working well in IE11:
.directive('myFlickity', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
// wait for the ngRepeat stuff to get set up
$timeout(function () {
// register DOM listeners and update the DOM
var slider = element.flickity(scope.$eval(attrs.alFlickity));
// grab the Flickity data object for later use
var sliderData = slider.data('flickity');
});
}
};
I was able to improve performance by simplifying my markup structure. IE is still much slower than other browsers, but it's tolerable. IE is dying anyway.
+1 IE 10+ support would be great. I'll use the polyfill for now thanks :)
I had an issue with IE11 -> 'Promise' is undefined Just used $q instead.
Worked for me
I'm having the same issue. @akhlopyk. Can you please how you ended up fixing it? Thanks for your help.