What is AngularJS?

AngularJS is also called just “Angular”.
  • AngularJS is an open-source JavaScript framework developed by Google.
  • AngularJS was originally started as a project in Google but now, it is open source framework.
  • It helps you to create single-pageĀ applications or one-page web applications that only require HTML, CSS, and JavaScript on the client side.
  • It is based on MV-* pattern and allow you to build well structured, easily testable, and maintainable front-endĀ applications
  • AngularJS is entirely based on HTML and JavaScript, so there is no need to learn another syntax or language.
  • AngularJS changes static HTML to dynamic HTML. It extends the ability of HTML by adding built-in attributes and components and also provides an ability to create custom attributes using simple JavaScript.

AngularJS Example

<!DOCTYPE html>

    <script src="~/Scripts/angular.js"></script>
<body ng-app>
    Enter Your Name: <input type="text" ng-model="name" /> <br />
    Hello <label ng-bind="name"></label>

The above example is plain HTML code with couple of AngularJS directives (attributes) such as ng-app, ng-model, and ng-bind.

Advantages of AngularJS

  1. Open source JavaScript MVC framework.
  2. Supports separation of concerns by using MVC design pattern.
  3. Built-in attributes (directives) makes HTML dynamic.
  4. Easy to extend and customize.
  5. Supports Single Page Application.
  6. Uses Dependency Injection.
  7. Easy to Unit test.
  8. REST friendly.