我有一个简单的AngularJS
应用程序,我用它grunt serve
来搭建代码并对其进行测试。我现在希望将代码部署到使用的服务器上,nginx
并且我正在使用在文件夹grunt build
中生成代码的任务来执行此操作。./dist
我现在希望将此代码传输到可以托管它的服务器。
我不知道该错误是否与缩小代码有关,但应用程序无法运行。
错误是:
Error: [$injector:unpr] Unknown provider: aProvider <- a
http://errors.angularjs.org/1.2.6/$injector/unpr?p0=aProvider%20%3C-%20a
at http://localhost/kds/scripts/ded94bd9.vendor.js:3:30474
at http://localhost/kds/scripts/ded94bd9.vendor.js:4:13890
at Object.c [as get] (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13194)
at http://localhost/kds/scripts/ded94bd9.vendor.js:4:13985
at c (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13194)
at d (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13440)
at Object.e [as instantiate] (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13587)
at http://localhost/kds/scripts/ded94bd9.vendor.js:4:29734
at http://localhost/kds/scripts/ded94bd9.vendor.js:4:22719
at f (http://localhost/kds/scripts/ded94bd9.vendor.js:3:30909)
这里出了什么问题?
编辑另外,在 Chrome 网络日志上:http ://cl.ly/image/3z0v3X2n1f3h
和 conf 部分nginx.conf
:
location /kds/ {
alias /Users/asheshambasta/code/kds/dist/;
index index.html index.htm;
}
并grunt serve
毫无问题地加载应用程序。