简体   繁体   English

Angular2-组件未定义

[英]Angular2 - Component is not defined

I have this plunker , with a small angular2 example, If you open the Chrome console, you will see my error. 我有一个plunker ,上面有一个小angular2示例,如果您打开Chrome控制台,将会看到我的错误。

Error: ArticleComponent is not defined(…)Zone.run @ angular2-polyfills.js:1243

What happens with my code? 我的代码会怎样?

Somthing more, Why my style is not resolved? 还有什么,为什么我的风格没有解决?

Can somebody help to resolve this? 有人可以解决这个问题吗?

Thanks 谢谢

我绝对不知道任何Angular 2(除了一些有趣的教程),但是如果您在component1.ts第43行中export class ArticleComponent (而不是仅定义类),那似乎就可以了:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM