What's the difference between an Angular component and module

前端 未结 7 1786
春和景丽
春和景丽 2020-12-22 14:51

I\'ve been watching videos and reading articles but this specific article make me so confused, at the start of the article it says

The applications in An

7条回答
  •  情深已故
    2020-12-22 15:12

    Simplest Explanation:

    Module is like a big container containing one or many small containers called Component, Service, Pipe

    A Component contains :

    • HTML template or HTML code

    • Code(TypeScript)

    • Service: It is a reusable code that is shared by the Components so that rewriting of code is not required

    • Pipe: It takes in data as input and transforms it to the desired output

    Reference: https://scrimba.com/

提交回复
热议问题