From 2a636e22920121ad9338b011d2cf4a6ed07813e4 Mon Sep 17 00:00:00 2001 From: Joakimk Date: Fri, 23 Nov 2018 21:42:09 +0100 Subject: [PATCH] Update flickity.service.js Added support for flickity change event --- src/flickity.service.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/flickity.service.js b/src/flickity.service.js index 0310ba7..5b96f41 100644 --- a/src/flickity.service.js +++ b/src/flickity.service.js @@ -556,7 +556,11 @@ export class FlickityService { } const ID = this.instances[flickityIndex].id; - + + _this21.instances[flickityIndex].instance.on('change', function () { + _this21.$rootScope.$emit('Flickity:' + ID + ':change', _this21.instances[flickityIndex]); + }); + this.instances[flickityIndex].instance.on('select', () => { this.$rootScope.$emit(`Flickity:${ID}:select`, this.instances[flickityIndex]); });