Basic knowledge of AngularJs

Posted By : Gaurav Prakash Ranjan | 26-Apr-2020

angularjs

Loading...

What is AngularJS?

AngularJS is an open-source front-end MVC framework based on JavaScript language. It is mainly maintained by Google corporations. It changes static HTML to dynamic HTML by adding some attributes and components. It also has the ability to create its own attributes using core JavaScript. This framework is primarily developed for single-page applications.

In AngularJs:

<!DOCTYPE html>

<html>

<head>

<script src="./Scripts/angular.js"></script>

</head>

<body>

<div ng-app="">

<p>Enter Your Name : <input type="text" ng-model="yourName"></p>

<h1>Hello! {{yourName}}</h1>

</div>

</body>

</html>

In javascript is as

<!DOCTYPE html>

<html>

<head>

<script src="./Scripts/jquery-1.10.2.min.js"></script>

</head>

<body>

<p>Enter Your Name: <input type="text" id="txt_my_name" /> </p>

<h1>Hello! <span id="lbl_my_name"></span></h1>

<script>

$(document).ready( function () {

$('#txt_my_name').keyup(function () {

$('#lbl_my_name').html($('#txt_my_name').val());

});

});

</script>

</body>

</html>

Advantages of AngularJS

  • It supports One Page Application development.
  • In AngularJS developers have permission to bind data of two ways.
  • It allows developers to divide code into several modules.
  • It supports the Model View Controller (MVC).
  • It is used to create the user interface.
  • It is easy to integrate with third-party features.

Some Common Applications of AngularJS:

  1. PayPal
  2. Netflix
  3. The Guardian
  4. Upwork
  5. Lego

Simple AngularJS Application

<!DOCTYPE html>

<html>

<head>

<title>Simple AngularJS Application</title>

<script src= "./Scripts/angular.js"></script>

</head>

<body ng-app >

<h1>Simple AngularJS Application</h1>

Enter Numbers to Add:

<input type="text" ng-model="firstNumber" /> + <input type="text" ng-model="secondNumber" />

= <span>{{firstNumber + secondNumber}}</span>

</body>

</html>

We are an ERP Development company with expertise in developing customized software solutions for our clients. Our developers use a vast technology stack to furnish clients with the best tools for their ERP. Our Angular development services enable businesses to build applications for eCommerce, SCM, WFM, and CRM. Talk to our experts to effectuate AngularJs and Javascript powered applications at your disposal.