我正试图得到一个全新的Ionic项目,在没有运气的情况下,使用棱角的本地存储。我指的是角局部存储错误,但我不知道怎么回事。
https://github.com/grevory/angular-local-storage
ionic start myApp tabs
cd myApp
ionic platform add ios
ionic build ios
bower install angular-local-storage
// app.js
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'LocalStorageModule'])然后
ionic serve错误
Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Error: [$injector:modulerr] Failed to instantiate module LocalStorageModule due to:
Error: [$injector:nomod] Module 'LocalStorageModule' 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.我错过了什么简单的东西?
发布于 2014-09-11 21:33:33
我不熟悉离子,但在我看来,你好像错过了剧本。
您确定页面中包含了脚本吗?我确认bower确实在您认为脚本应该在的地方安装了脚本,然后在抛出此错误之前确保它的实际引用。
发布于 2016-10-14 10:52:52
盖伊应该检查你有没有给它的脚本添加链接
src="https://rawgit.com/grevory/angular-local-storage/master/dist/angular-local-storage.min.js" 在索引文件中使用<script></script>标记。这可能是问题所在。对那些将来会看到这一切的人来说。
https://stackoverflow.com/questions/25797092
复制相似问题