json-logic-js icon indicating copy to clipboard operation
json-logic-js copied to clipboard

How can I import it in angular

Open zohabAli opened this issue 6 years ago • 1 comments

I have installed json-logic-js like this: npm install json-logic-js but how can I import it?

I have tried these but still not working: import {jsonLogic} from 'json-logic-js/logic.js' import {jsonLogic} from 'json-logic-js'

zohabAli avatar Jun 28 '18 14:06 zohabAli

@zohabAli I used this import statement:

import * as jsonLogic from 'json-logic-js/logic.js'

and next in code I just call the function apply:

jsonLogic.apply( { "==" : [1, 1] } )

Ency88 avatar Jul 10 '18 13:07 Ency88