search

Home  >  Q&A  >  body text

javascript - Does every component in angular2 have a corresponding module?

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! ! !

代言代言2713 days ago730

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-06-14 10:56:13

    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

    reply
    0
  • 黄舟

    黄舟2017-06-14 10:56:13

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

    reply
    0
  • Cancelreply