What's the difference between an Angular component and module

前端 未结 7 1731
春和景丽
春和景丽 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:14

    A module in Angular 2 is something which is made from components, directives, services etc. One or many modules combine to make an Application. Modules breakup application into logical pieces of code. Each module performs a single task.

    Components in Angular 2 are classes where you write your logic for the page you want to display. Components control the view (html). Components communicate with other components and services.

提交回复
热议问题