An Introduction to Angular JS

  • The ng-bind directive binds application data to the HTML view.
  • Post was not sent – check your email addresses!
  • AngularJS extends HTML with ng-directives.
  • In the post we will have a look on a very popular MVVM javascript framework â Angular JS .
  • The ng-model directive binds the value of HTML controls to application data.

An Introduction to Angular JS. In this post we will have a look on Angular JS, its introduction and how to use it in a very simple way.

@dotnetsnippets: An Introduction to Angular JS

In this post we will have a look on a very popular MVVM javascript framework – Angular JS.

What is Angular JS?

AngularJS is nothing but a JavaScript framework. We use angular just like any normal javascript in our page. The only difference being we get to do so many things quickly without much hassles which we will be seeing later.

It can be added to an HTML page with a script tag. It is a library written in JavaScript.

We can either download the Angular JS files locally on the system and use in the application or we can take a link from the CDN. It is up to the developer to decide. Usually referring CDN link is preferable as making changes to the code is not recommended.

Use the below link in the head section of the HTML mark up to add Angular JS in your project.

AngularJS extends HTML with ng-directives.

The ng-app directive defines an AngularJS application.

The ng-model directive binds the value of HTML controls to application data.

The ng-bind directive binds application data to the HTML view.

Write the following markup in a webpage.

We use {{ }} brackets in Angular JS to perform operations. In the above example we have specified addition of two numbers. Let us see the output now.

Note: While referring CDN links make sure the internet connection is On. Otherwise the code will not work. In such scenarios it is advisable to download the files locally.

An Introduction to Angular JS