StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Application & Data
  3. Frameworks
  4. Javascript Mvc Frameworks
  5. Angular 2 vs Angular CLI

Angular 2 vs Angular CLI

OverviewDecisionsComparisonAlternatives

Overview

Angular
Angular
Stacks3.8K
Followers4.8K
Votes499
GitHub Stars99.2K
Forks26.7K
Angular CLI
Angular CLI
Stacks886
Followers744
Votes0
GitHub Stars27.0K
Forks11.9K

Angular 2 vs Angular CLI: What are the differences?

Introduction

Angular 2 and Angular CLI are both widely used frameworks for developing web applications. While Angular 2 is a complete platform for building single-page applications, Angular CLI is a command-line interface tool that simplifies the process of creating and managing Angular projects. Although they are closely related, there are several key differences between Angular 2 and Angular CLI that developers should be aware of.

1. Template Structure:

In Angular 2, the template structure follows a component-based approach, where each component has its own HTML, CSS, and TypeScript files. This allows for better organization and separation of concerns. On the other hand, Angular CLI provides a project structure that includes separate folders for components, services, and other modules, making it easier to manage larger projects.

2. Code Generation:

Angular 2 requires developers to manually create the skeleton code for components, services, and other modules. This can be time-consuming and error-prone, especially for larger projects. Angular CLI, on the other hand, provides a set of powerful commands that automatically generate the necessary files and code for different project components, saving developers a significant amount of time and effort.

3. Build and Compilation:

Angular 2 uses a custom build process that involves transpiling TypeScript code to JavaScript, bundling all the dependencies, and generating the final output files. While this provides a high level of customization, it can be complex and requires additional tools and configuration. In contrast, Angular CLI abstracts away the build process and automates it, making it easier for developers to build, compile, and optimize their applications.

4. Testing and Debugging:

Angular 2 provides a testing framework, known as @angular/testing, which allows developers to write unit tests and perform end-to-end testing. However, setting up and configuring the testing environment can be challenging and time-consuming. Angular CLI simplifies this process by providing a built-in testing framework, making it easier for developers to write and execute tests, as well as debug their applications.

5. Project Configuration:

Angular 2 requires developers to manually configure various aspects of the project, such as routing, TypeScript compilation options, CSS preprocessors, and more. This can be overwhelming, especially for beginners. Angular CLI, on the other hand, provides a centralized configuration file (angular.json) that allows developers to easily configure different aspects of their project, reducing complexity and making it easier to maintain and update the project configuration.

6. Deployment and Optimization:

Deploying and optimizing an Angular 2 application can be a complex process, involving tasks such as minification, code splitting, tree shaking, and caching. Angular CLI simplifies this process by providing built-in optimization features, such as production builds that automatically minify and optimize the code, making the application smaller and faster to load. Additionally, Angular CLI includes features like lazy loading, which further enhances the performance of the application.

In Summary, Angular 2 and Angular CLI have several key differences. Angular 2 focuses on providing a platform for building single-page applications, while Angular CLI simplifies the development process by automating tasks like project setup, code generation, testing, and deployment. Angular CLI provides a centralized configuration file, built-in optimization features, and a modular project structure, making it easier for developers to manage and maintain their applications.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Angular, Angular CLI

Dennis
Dennis

CTO at Prepaid-Hoster

May 17, 2020

Decided

I was first sceptical about using Angular over AngularJS. That's because AngularJS was so easy to integrate in existing websites. But building apps from scratch with Angular is so much easier. Of course, you have to build and boilerplate them first, but after that - you save a ton of time. Also it's very cozy to write code in TypeScript.

181k views181k
Comments
Kyle
Kyle

Web Application Developer at Fortinet

Oct 16, 2019

Decided

When deciding on a front end framework to build my bitcoin faucet project, I knew I needed something battle hardened, dependedable, but also feature filled and ready to go out of the box.

While I've written some smaller apps with ng2+, I've never gone full tilt with it so I knew there were still some things to learn, and most importantly: how to do them properly, such as proper component architecture and breaking old habbits from ng1.

I didn't opt for React in this case, simply due to the need to stack more and more things on top of it to do what I'd need it to do. I wanted a framework that was going to take over routing and execution of complex UI controls, and keep items outside of a component's scope updated and react to events. This framework needed a comprehensive event emission system, data acquisition and handling, bi-directional data binding, state, and a series of things that you'd need to install separately for React to match up to what's already in the box with Angular.

I opted to stick to Angular instead of Vue for the fact that Angular also already has it's entire build system ready to go and comprehensivly built to deliver the tiniest version of it's deliverable. I was hosting this thing in a google cloud instance, so I needed to make sure the app stayed as small as possible, and could automatically trim out the cruft. This is where Angular's built in Tree Shaking took precedence for me.

Vue is more than capable of handling everything I'd need, and it was something I took serious considerion of. For instance, Vue poweres Cointiply, another bitcoin faucet application that's highly reactive and high componentized just like I wanted.

But I'd still need to learn Vue, I'd still need to configure it's build system, and I still wanted to use SCSS and TypeScript.

So Angular it was. ng8 is a great platform for building very complex user interfaces, and has many of the problems you'd inevitably face integrating a user interface to an application already figured out, and complete with a best practice recommendation.

React and Vue, given enough time and energy, are super capable platforms. No one can deny that. Angular's "A-Z Batteries Included" approach to the whole development process is what made it especially enticing this time.

55.4k views55.4k
Comments
Julius
Julius

PHP Engineer

Jan 31, 2020

Decided

It is a complete waste of time and life to learn a different framework to solve the same problem (Both AngularJS and Angular build A+ UI's, but both require a lot of time to learn). It's dumb to spend 200 hours learning AngularJS, then 200 hours learning Angular when you could spend 200 hours learning AngularJS and 200 hours learning how to solve a different problem (like AI/ML, Data Science, AR/VR, Digital Marketing, etc.)

115k views115k
Comments

Detailed Comparison

Angular
Angular
Angular CLI
Angular CLI

It is a TypeScript-based open-source web application framework. It is a development platform for building mobile and desktop web applications.

A command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications. You can use the tool directly in a command shell, or indirectly through an interactive UI such as Angular Console.

Progressive Web Apps; Native; Code Generation; Code Splitting
-
Statistics
GitHub Stars
99.2K
GitHub Stars
27.0K
GitHub Forks
26.7K
GitHub Forks
11.9K
Stacks
3.8K
Stacks
886
Followers
4.8K
Followers
744
Votes
499
Votes
0
Pros & Cons
Pros
  • 109
    It's a powerful framework
  • 53
    Straight-forward architecture
  • 48
    TypeScript
  • 45
    Great UI and Business Logic separation
  • 40
    Powerful, maintainable, fast
Cons
  • 9
    Overcomplicated
  • 9
    Large overhead in file size and initialization time
  • 2
    CLI not open to other test and linting tools
  • 2
    Ugly code
No community feedback yet
Integrations
Bugsnag
Bugsnag
Firebase
Firebase
Sentry
Sentry
Socket.IO
Socket.IO
AngularJS
AngularJS

What are some alternatives to Angular, Angular CLI?

AngularJS

AngularJS

AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding.

Vue.js

Vue.js

It is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API.

Ember.js

Ember.js

A JavaScript framework that does all of the heavy lifting that you'd normally have to do by hand. There are tasks that are common to every web app; It does those things for you, so you can focus on building killer features and UI.

Backbone.js

Backbone.js

Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.

Aurelia

Aurelia

Aurelia is a next generation JavaScript client framework that leverages simple conventions to empower your creativity.

Ant Design

Ant Design

An enterprise-class UI design language and React-based implementation. Graceful UI components out of the box, base on React Component. A npm + webpack + babel + dora + dva development framework.

Mithril

Mithril

Mithril is around 12kb gzipped thanks to its small, focused, API. It provides a templating engine with a virtual DOM diff implementation for performant rendering, utilities for high-level modelling via functional composition, as well as support for routing and componentization.

Marionette

Marionette

It is a JavaScript library with a RESTful JSON interface and is based on the Model–view–presenter application design paradigm. Backbone is known for being lightweight, as its only hard dependency is on one JavaScript library, Underscore.js, plus jQuery for use of the full library.

Angular Universal

Angular Universal

It executes on the server, generating static application pages that later get bootstrapped on the client. This means that the application generally renders more quickly, giving users a chance to view the application layout before it becomes fully interactive.

Angular Material

Angular Material

Sprint from Zero to App. Hit the ground running with comprehensive, modern UI components that work across the web, mobile and desktop. It allows to create material styled angular apps fast and easy.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase