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