javascript - Invoking in strict mode -


i have configuration object:

jwtoptionsprovider.config({         tokengetter: (store) => {             return store.get('token');         },         whitelisteddomains: ['localhost']     }); 

but, have strict mode enabled , following error:

tokengetter not using explicit annotation , cannot invoked in strict mode

i know $inject, how use in situation?

just try

jwtoptionsprovider.config({     tokengetter: ['store', (store) => {         return store.get('token');     }],     whitelisteddomains: ['localhost'] }); 

see https://github.com/auth0/angular-jwt#i-have-minification-problems-with-angular-jwt-in-production-whats-going-on


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -