This Angular tutorial helps you get started with Angular quickly and effectively through many practical examples.

Difference Detween Component and Module


Angular Component

Components are the basic building block of code. a component is a combination of Data, HTML Template and Logic in a view. Components allows re-usability that means we can create component once but we can reused many times within an application and even in other applications. A component can be reused throughout the application and even in other applications. Every angular app has atleast one component. The angular application have more than one components. Each component have small part of UI code. These components works togeather to complete the application. One Angular applications have more then one components. Each component handles a small part of UI functionality. These components work together to produce the complete user interface  Read More.....

Angular Modules

In Angular, a module is a group or combination of components, directives, pipes and services. An application contains one or more modules every module performs a single task. It help us to keep code clarity and easy to use . At least one module present in every angular application, which is NgModule class. So angular module is the way to share and reuse code across your application  Read More.....

Difference between Module and Component

SNo. Module Component
1  The Angular Components are defined using @ngModule Decorator  The Angular Components are defined using @Component Decorator
2   A module is a group of components, directives, pipes and services  A Components are the basic building block of code.
3   An application contains one or more modules every module performs a single task  The angular application have more than one components. Each component have small part of UI code.
4  Example - Creating component for all the header, footer, side bar and main page. These all group of component become part of a modules.  Example - When we develop header, footer, side bar and main page as a component. Each component have small part of UI code.

Prev Next