angular-multi-select icon indicating copy to clipboard operation
angular-multi-select copied to clipboard

using multi select with webpack( vendor.js) loki is not defined

Open ishanskya opened this issue 8 years ago • 1 comments

Hello The multi select directive was throwing below exception because it can't find the lokijs reference.
ReferenceError: loki is not defined at new Engine (eval at ../node_modules/angular-multi-select/dist/prod/angular-multi-select.js (vendor.bundle.js:862), :830:17) at Object.link (eval at ../node_modules/angular-multi-select/dist/prod/angular-multi-select.js (vendor.bundle.js:862), :2402:15) at eval (eval at ../node_modules/angular/angular.js (vendor.bundle.js:890), :1346:18) at eval (eval at ../node_modules/angular/angular.js (vendor.bundle.js:890), :10420:44)

i managed to fix the issue by adding var loki = require('lokijs')

is there a way around this issue? if not can you release a patch for this Thanks

ishanskya avatar Oct 20 '17 14:10 ishanskya

added this to our index.html page instead of adding a require and installing it. This is also in the docs here: http://alexandernst.github.io/angular-multi-select/#/getting-started

<script src="https://cdnjs.cloudflare.com/ajax/libs/lokijs/1.3.16/lokijs.min.js"></script>

Russelldan554 avatar Aug 18 '22 17:08 Russelldan554