javascript - Does every component in angular2 have a corresponding module?
代言
代言 2017-06-14 10:54:13
0
2
729

I just started learning angular2, and I didn’t understand it very well. I was confused, so I asked the seniors in the company to look at the project files they had done before, and found that each of their component files had a corresponding Module file. I would like to ask if it must be like this? If not, under what circumstances should it be created and under what circumstances should it not be used?

I hope someone who knows can give me an answer. Thank you very much! ! !

代言
代言

reply all(2)
洪涛

This is not necessary. Normal functions are divided by modules. Each module has a corresponding module file. You can refer to the API on the official website

黄舟

Recommend an introductory tutorial for you: http://www.hubwiz.com/course/...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template