angularjs的一点总结
生活随笔
收集整理的這篇文章主要介紹了
angularjs的一点总结
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
一,錯(cuò)誤小結(jié)
1.出現(xiàn)類似于下面的錯(cuò)誤,就是說(shuō)明?$sessionStorage 這個(gè)服務(wù)未找到
Error: [$injector:unpr] Unknown provider: $sessionStorageProvider <- $sessionStorage <- LoginCtrl解決辦法是引入這個(gè)服務(wù)(ngStorage中包含sesseionStorage和localStorage等):
var userModule=angular.module('userModule', [ 'ngStorage']);?
2.出現(xiàn)如下錯(cuò)誤,是說(shuō)明ngStorage這個(gè)服務(wù)為安裝:
Uncaught Error: [$injector:modulerr] Failed to instantiate module userModule due to: Error: [$injector:modulerr] Failed to instantiate module ngStorage due to: Error: [$injector:nomod] Module 'ngStorage' 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.解決辦法是安裝這個(gè)服務(wù):
bower install ngstorage
轉(zhuǎn)載于:https://www.cnblogs.com/gaojiang/p/7844791.html
總結(jié)
以上是生活随笔為你收集整理的angularjs的一点总结的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: CSS深入理解流体特性和BFC特性下多栏
- 下一篇: clone()与image和 clone