What's the difference between an Angular component and module

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

    Well, it's too late to post an answer, but I feel my explanation will be easy to understand for beginners with Angular. The following is one of the examples that I give during my presentation.

    Consider your angular Application as a building. A building can have N number of apartments in it. An apartment is considered as a module. An Apartment can then have N number of rooms which correspond to the building blocks of an Angular application named components.

    Now each apartment (Module)` will have rooms (Components), lifts (Services) to enable larger movement in and out the apartments, wires (Pipes) to transform around and make it useful in the apartments.

    You will also have places like swimming pool, tennis court which are being shared by all building residents. So these can be considered as components inside SharedModule.

    Basically, the difference is as follows,

    Follow my slides to understand the building blocks of an Angular application

    Here is my session on Building Blocks of Angular for beginners

提交回复
热议问题