简体   繁体   中英

grunt undefined Method error?

I have an Angular App that uses grunt to build and minify. I have imported one library in index.html like this: <script type="text/javascript"> java script code </script> between the header tag. It is supposed to make the methods of that library globally available though my application. The problem is that when I run grunt to build my application, grunt doesn't recognize the method of that library. What should I do to fix it? The error I get in grunt is: 'the method I used' is undefined.

Use /* global name of the method* / at the top of the file where grunt gives you undefined error. it will make that method globally available. so you don't need to be worried about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM