Skip to Content
  • Development

What is Angular CLI and why should I care?

Coding on apple desktop computer image description

With the introduction of Angular 2 we were also gifted with Angular CLI, a command-line interface for creating Angular projects. Angular CLI is a simple tool installed via NPM that allows you to get a fully-fledged Angular project up and running within minutes.

So what makes Angular CLI great? Well, up until now we haven’t had any real contenders within the Angular space. Additionally, the ideal Angular 2 development setup is far more complex than its predecessor now that it’s leveraging Webpack and Typescript.

But with all those changes comes a level of complexity - we now have to compile, bundle and serve those bundles. This is where Angular CLI really starts to shine, it can provision a zero-configuration required project that handles everything, including the Typescript and Webpack configuration!

The good news here is that all these new bells and whistles provide a much smoother and more-streamlined development process. Typescript provides us with a lot of the benefits of a fully-typed language and allows us to compile to various ECMAScript versions. Whilst Webpack provides a heavily improved build and bundling process, whilst allowing you to save stacks of time when developing by leveraging Hot Module Replacement.

With a few simple and optionally configurable commands, Angular CLI provides you with the tools to do the following:

  • Create project - with all project folders and scaffolding to boot,
  • Add additional components, routes, services and pipes,
  • Run a local development server - with Hot Module Replacement out of the box,
  • Build - with multiple target environments.

The Angular ecosystem has been rapidly maturing and stabilizing over the past few months. For those of you that haven’t given Angular a look, now is a better time than ever to test the waters, check out the links below to get started.

More recently, Angular CLI had its first non-beta release, version 1.0. Release 1.0 promised improved build time and performance, and absolutely delivered. Internally we’ve seen build times almost halved in comparison to Beta 28.

***

Mudbath is a 40+ person digital product agency based in Newcastle, NSW. We research, design and develop products for industry leaders.

Are you a developer who's looking to join Newcastle's fastest-growing software agency? Get in touch.