【发布时间】:2014-03-05 20:31:22
【问题描述】:
当我使用 yeoman 安装 angularjs 时,我被要求安装一些额外的软件包,例如:
角度路线
角度清理
等等……
现在我删除 angular-sanitize:
bower uninstall --save angular-sanitize
当我开始我的 index.hmtl 页面时
grunt server
然后我的浏览器窗口是白色/空的,浏览器控制台说:
Uncaught Error: [$injector:modulerr] Failed to instantiate module appApp due to:
Error: [$injector:modulerr] Failed to instantiate module ngSanitize due to:
Error: [$injector:nomod] Module 'ngSanitize' is not available! You either misspelled the mo...<omitted>...1)
1) 现在我问自己为什么我可以选择安装核心 angular.js 所需的 angular 插件。
2) 我该如何解决这个烂摊子?我不需要 ngSanitize。
【问题讨论】:
-
角芯不需要。您的应用程序的模块需要它。在你的源代码中移除对这个模块的依赖。
-
你说得对,我删除了 dep。但现在我必须修复新的 ui-router 东西,因为我删除了 ngRoute :S