Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

关于angular2 依赖注入的问题 #25

Closed
liwenbing opened this issue Jul 13, 2016 · 3 comments
Closed

关于angular2 依赖注入的问题 #25

liwenbing opened this issue Jul 13, 2016 · 3 comments

Comments

@liwenbing
Copy link

你好:
我在中文官网中按照 Visual Studio 2015 中新建 angular2 quickstart 项目并架设到本地IIS,并能很好的运行,但在我添加其他组件并需要注入http组件时,则出现“Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'DemoService' is decorated with Injectable”错误,
后来我尝试使用 npm start 编译并启动 quickstart 项目时,却能很好的运行。
关于使用visual studio 编译typescript 和 npm 在注入方面有什么区别吗,或您有关于此问题的建议吗?

@rexebin
Copy link
Contributor

rexebin commented Jul 13, 2016

能否共享你出错的项目,我们可以帮你看看,谢谢。

@asnowwolf
Copy link
Contributor

如果自己解决了,请回复一下解决的办法,以便我们关闭它。谢谢!

@liwenbing
Copy link
Author

升级了TypeScript的版本,但在Visual Studio 2015 中并没有使用最新的版本。 删除项目文件关于TypeScript的描述后正常

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants