DEV Community

Cover image for Angular : Components
John Peters
John Peters

Posted on • Updated on

Angular : Components

Why Components?

The demand for more and more features within Web applications is increasing exponentially. This means that to keep up with the demand we must focus on an "assembly" line approach to software creation.

Each station in an assembly line adds another component to the product; where, each component is sourced independently from other components. Each component is only responsible for one thing,n works flawlessly and just snaps into the overall product.

This is how we want to train ourselves in Angular design; lots of Small parts that have these features.

1) Each component will do only one thing.
2) Each component will work every time, in the same way.
3) Each component will be completely isolated unto itself.

Angular's CLI (command line interface) makes creating components super easy. In Visual Studio code click on Terminal. In the Terminal Session (usually a PowerShell session).

To Create a Component, Simply type in

'ng g component componentName'

A new component shows up in the current directory and you are ready to start creating small parts.

Follow the 3 suggestions above and you are well on your way to creating very good applications!

Top comments (0)