我得到这个错误[否模块:ngResource" [英] I am getting this error "No module: ngResource"

查看:145
本文介绍了我得到这个错误[否模块:ngResource"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图用角$资源,其回来不的方法。通过稀疏的文档看,我能找到这样的:

Trying to use the Angular $resource, and its coming back as not a method. Looking through the sparse documentation, I was able to find this :

angular.module('productServices', ['ngResource']).

这是你应该把它列入你的应用程序模块中。很公平,我把它和得到:

That you're supposed to include it in your app module. Fair enough, I throw it in and get :

Uncaught Error: No module: ngResource 

嗯..这是否不附带Angular.js和一个单独的插件?

Hmm.. does this not come with Angular.js and its a separate plugin?

推荐答案

这是一个单独的文件,你需要在你的项目包括,为1.0.0rc3版本(<一个href=\"https://github.com/angular/angular.js/blob/master/CHANGELOG.md#100rc3-barefoot-telepathy-2012-03-29\">see更新日志在GitHub上)。

It's a separate file that you'll need to include in your project, as of version 1.0.0rc3 (see changelog on GitHub).

HTTP头://$c$c.angularjs.org - 文件夹下的任何版本后,此版本中,您将看到可供下载,包括在项目中的角resource.js 文件。

Head over to http://code.angularjs.org -- under the folder for any version after this release, you should see the angular-resource.js file available for download and inclusion in your project.

这篇关于我得到这个错误[否模块:ngResource&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆