• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

AngularJS Tutorials

Welcome to AngularJS Tutorials. The objective of these tutorials is to provide in depth understand of AngularJS.

In addition to free AngularJS, we will cover common interview questions, issues and how to’s of AngularJS.

Introduction

AngularJS is a very powerful JavaScript Framework. It is used in Single Page Application (SPA) projects. It extends HTML DOM with additional attributes and makes it more responsive to user actions. AngularJS is open source, completely free, and used by thousands of developers around the world.

AngularJS is based on the MVC pattern (Model View Control). Therefore AngularJS separates your RIA application into models, views and controllers. The views are specified using HTML + AngularJS own template language. The models and controllers are specified via JavaScript objects and JavaScript functions.

A Model View Controller is a software design pattern for developing web applications.

-MVC is popular because it isolates the application logic from the user interface layer and supports separation of concerns.

-The controller receives all requests for the application and then works with the model to prepare any data needed by the view.

-The view then uses the data prepared by the controller to generate a final presentable response.

Model − It is the lowest level of the pattern responsible for maintaining data.

View − It is responsible for displaying all or a portion of the data to the user.

Controller − It is a software Code that controls the interactions between the Model and View.

Interested in mastering AngularJS Training? Enroll now for FREE demo on AngularJS Training.

MVC is popular because it isolates the application logic from the user interface layer and supports separation of concerns. The controller receives all requests for the application and then works with the model to prepare any data needed by the view. The view then uses the data prepared by the controller to generate a final presentable response.

Capture.320

AngularJS Expressions

Expressions are used to bind application data to html. It is written inside double braces like {{ expression}}. Expressions are the same way as ng-bind directives. Anglers application expressions are pure javascript expressions and outputs the data where they are used.

Using numbers

Use numbers or numeric values in Angular expressions. Numeric values can have decimal values too.

<div ng-app>
     I have written <b> {{3000}} </b> plus articles.
</div>

Using strings

Assign values to the expressions, dynamically using an Angular directive. This technique will spare you from assigning static values and instead you can add different types of values

<div ng-app ng-init="name='Arun Banik'">
     My name is <b> {{ name }} </b>
</div>

Using object

<p>Roll No: {{student.rollno}}</p>

Using array

<p>Marks(Math): {{marks[3]}}</p>

Module

A module is a collection of services, directives, controllers, filters, and configuration information. The angular.module is a global place for creating, registering and retrieving Angular modules.

// Create a new module
var myModule = angular.module('myModule', []);
// register a new service
myModule.value('appName', 'MyCoolApp');
// configure existing services inside initialization blocks.
myModule.config(['$locationProvider', function($locationProvider) {
 // Configure existing providers
 $locationProvider.hashPrefix('!');
}]);

create an injector and load your modules like this:

var injector = angular.injector(['ng', 'myModule'])

Check out the top AngularJS Interview Questions now!

Usage

angular.module(name, [requires], [configFn]);

Advantages of AngularJS

-It provides the capability to create Single Page Application in a very clean and maintainable way.

-It provides data binding capability to HTML. Thus, it gives user a rich and responsive experience.
-AngularJS code is unit testable.
-AngularJS uses dependency injection and make use of separation of concerns.
-AngularJS provides reusable components.
-With AngularJS, the developers can achieve more functionality with short code.
In AngularJS, views are pure html pages, and controllers written in JavaScript do the business processing.
On the top of everything, AngularJS applications can run on all major browsers and smart phones, including Android and iOS based phones/tablets.

Disadvantages of AngularJS

-An appilacation written in AngularJS are not safe, JavaScript is only a framework. They are not secure

-It is not degradable if the user of applications disabled the JavaScript, then nothing would be visible

For an Indepth knowledge on AngularJS, click on below

Contact US

Need an Instructor Led Training, Contact Us





Enter this code: captcha