简体   繁体   中英

Cannot add ngCookie to Angular Module with error using Bower

After installing Angular-Cookie with bower and adding the js file to my HTML I cannot add ngCookies to work with it displaying the following error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module Dashboard due to: Error: [$injector:modulerr] Failed to instantiate module ngCookies due to: Error: [$injector:nomod] Module 'ngCookies' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

The official module from Angular is called Angular-Cookies which can be installed using:

bower install -s angular-cookies

You can remove the other module by running

bower uninstall angular-cookie

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