From c58a22021000ac2d99377cc0bf9ac193a12563c5 Mon Sep 17 00:00:00 2001 From: Gustavo Mazzoni Date: Tue, 26 Jul 2016 12:13:50 -0300 Subject: [PATCH] Added Angular support with LZString as a Factory. --- libs/lz-string.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/lz-string.js b/libs/lz-string.js index 2c4a11a..1194e25 100644 --- a/libs/lz-string.js +++ b/libs/lz-string.js @@ -498,4 +498,9 @@ if (typeof define === 'function' && define.amd) { define(function () { return LZString; }); } else if( typeof module !== 'undefined' && module != null ) { module.exports = LZString +} else if( typeof angular !== 'undefined' && angular != null ) { + angular.module('LZString', []) + .factory('LZString', function () { + return LZString; + }); }