Friday 5 May 2017

Top 8 Reasons to Choose AngularJS for Web Applications


Demand of Web Applications is increasing day by day because of every organization keep their business online. On the basis of a recent survey there are more than 900 million websites existing in the world and the count is still increasing. Many platforms are there for build websites.

AngularJS is an open source web application framework which is released by Google. AngularJS makes your front end web development more easier. This framework is combination of HTML, CSS and Java Script.

Here are the reasons why we need to choose AngularJS for your next Web Applications.

1. Enhanced Design Architecture

2. Ease of Development

3. Easy Plug & Play Components

4. Better Performance

5. Two Way Data Binding

6. Single Page Application (SPA)

7. Write Less and Get More

8. Easy to Learn

To Know more details about the above 8 Reasons, please visit Our main Blog Best AngularJS Training.


Thursday 13 April 2017

Detailed explanation about $http Service in Angularjs



In out previous Article we discussed about Routing in AngularJS. Here we go about importance of $http service in Angularjs. To know more about the complete Services and Directives in AngularJS, Please visit AngularJS Training in Chennai.
 $http is a core AngularJS service which is used to create communication with remote http servers via Browser’s inbuilt object XMLHttpRequest.

$http.get(‘/someUrl’, config).then(successCallback, errorCallback);
$http.post(‘/someUrl’, data, config).then(successCallback, errorCallback);
$http.put(‘/someUrl’, data, config).then(successCallback, errorCallback);
$http.delete(‘/someUrl’, config).then(successCallback, errorCallback);
Here the get and post are the method of passing data to the url.  There are few more methods are available as follows.
To read more, please visit Best AngularJS Training in Chennai.

Thursday 6 April 2017

Routing in AngularJS


In our previous Article we discussed about Services and Factories then Providers in AngularJS. Now we are going see about  important concept which is Routing in AngularJS. 


Routing in AngularJS allows your application becomes a Single Page Application (SPA). In your application, you have to navigate to different pages, at the same time your application should be act as SPA without page reload. This is called as Routing.

For the Routing, here we use ngRoute Module. This module routes our applications to different pages without page refreshment.


At first you need to include the routing library file.
<script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular-route.js”></script>

Next include ngRoute dependency in your application module.
var app = angular.module(“myApp”, [“ngRoute”]);

Now your application ready to access Routing.

To Read more about 




To know about the complete collections of Topics in Angularjs, Please visit Best AngularJS Training in Chennai.


Friday 31 March 2017

Understanding Providers in AngularJS


In our previous Article, we discussed about service and Factory. Here is the complete details about Providers.
Provider allows us to create and inject a service into configuration phase of our application. For example, If we want to set API key to access the application, we can set the API key via provider and pass the provider to the application while its in config phase.


Module.config(function ($provide) {

$provide.provider(‘globalSetting, function() {

this.$get = function {

var appname = “My 1st Application”;

return {

appName: appname

};
}

})

});


1.     Inject $provide built-in service in config method.
2.     Create a provider service by using $provide.
3.     The Provider service function has 2 parameters
i.        The provider service Name.
ii.      Function
4.     The provider must have this.$get function

5.      Return the object literal from this function

Now the “globalSetting” provider is available for all other components. Because it has some properties and methods in a object.

To View about the Complete Article, Please visit our Main Blog.

Tuesday 28 March 2017

What is Services and Factory in AngularJS



Services are singleton objects. In other words, It's javascript function to perform a specific task. Angular allow us to use these services with controllers, service, filter or directive.

Whenever we want to use service with the above components, we will have to inject the service name along with the component. By doing so, component ask angular to load that particular service in the application. This method of injecting service is called dependency injection.

To know more about the complete collection of Service lists, please visit Complete lists of Services.


To use a service, you will have to add it as a dependency with a component  such as controller, filter  or service. To add a service with component, you have to pass it as an argument.

For Example:

App.controller(“controllerName”, function($scope, $service))
{

});

In the above example we injected our $service along with the controller.


There are 2 types of Services are available in AngulrJS,

1.     Inbuilt Service
2.     Custom Service

Inbuilt Service:

AngulaeJS provides  many Built-in Services and Each service has individual functions and characteristics. The built-it services are prefixed by $ sign.


For Example,

$http, $filter, $route, etc.,

Custom Services:

AngularJS allows users to create their own Service. You can add any functions and behaviors to the custom service.

For Example,

app.service('servicename', function() {

this.maethodname1 = function() {
......
}
this.methodname2 = function() {
......
}

});


In the factory method of creating service, we first create empty object of the factory then we assign properties and method to it and at last, we return the factory object. Below syntax is used to create service using factory method.

For Example,

modulename.factory('Factoryname', function() {
var factory = {};
factory.methodname1 = function() {
.............
}
factory.methodname2 = function() {
..............
}
return factory;
});
We can also inject the above existing factory in to our service.

For Example,

app.service('servicename', function(‘'Factoryname'’) {

this.maethodname1 = function() {
......
}
this.methodname2 = function() {
......
}

});

I hope you got a cleared information about service and Factory. To know more about all other topics, please visit AngularJS Complete Topics.




Friday 24 March 2017

Amazing Form Validation by using AngularJS


AngularJS provides an amazing form validation by default. We don't need to write any additional code. AngularJS allows you to get current state of Input Elements and also Forms.
By using the states you can do form validation and also you can set options for the validation messages, like in which state the message should be display.

Here you can get complete collection of AngularJS Topics.

Here are the list of states for Input Elements

  • $untouched
  • $touched
  • $pristine
  • $dirty
  • $invalid
  • $valid
  • $error

Here are the list of states for Form

  • $pristine
  • $dirty
  • $invalid
  • $valid
  • $submitted
To Know more about the above Form and Input states Please visit our Main Blog


Wednesday 22 March 2017

Different Types of Filters in AngularJS


AngularJS provides number of inbuilt Directives and we don't need to write any additional code to get the filter feature. By adding the filter component, we can access the features. Here I have listed of list of Filters.

1.Currency

2.Date

3.Filter

4.json

5.lowercase / uppercase

6.orderBy

To know about the full description of the above Filters, Please click Complete collection of AngularJS File.

Friday 10 March 2017

Top 10 Directives in AngularJS


Directives are the normal HTML Syntax. AngularJS allows you to extend existing HTML syntax with new attributes called as Directives. AngularJS comes with set of inbuilt Directives and all the Directives has individual behaviors.

All the Directives are starts with the prefix of “ng-”. Also AngularJS allows the developer to create custom Directives with custom behaviours.

Here are the list of Top 10 Directives in AngularJS,

1.     ng-app
2.     ng-model
3.     ng-bind
4.     ng-click
5.     ng-controller
6.     ng-hide / ng-show
7.     ng-if
8.     ng-include
9.     ng-repeat

10. ng-submit

To know More about the above 10 Directives, Please Visit Top 10 Directives of AngularJS.

Thursday 2 March 2017

5 Pillars of AngularJS




We saw a Brief Introductionof AngularJS in our Previous Article. Here You go about the Main 5 Pillars of AngularJS. As we know that Starting an AngularJS Application is incredibly very Easy.

You can Implement Angularjs in your Application by just 2 stpes.

Step 1:

Just you need to include the Angularjs Library file in your HTML <head> Tag.
<script scr=”angulrjs.js”></script>

Step 2:

Initialize the Angularjs Module in you Application with root element of AngularJS.
<HTML ng-app>

That’s it, You have successfully implemented AngularJS in your Application.

To know more about the Trending Framework - AngularJS Visit us.

Here we go about the main 5 pillars of AngularJS. It will be helpful for further going. The names of 5 pillars are,

1.     Directives
2.     Controllers
3.     Scopes
4.     Services
5.     Dependency Injection

Lets see a glance about the above 5 pillars.

Check AngularJS lists of Other components also.

1. Directives

Directives are nothing but HTML Tags and attributes. AngularJS has plenty of inbuilt Directives and each directive has individual behaviors.
It extends existing HTML Tags with additional Attributes. AngularJS allows you to create your own Directives. It means you can create a directive in your name, like <your-name></your-name>
ng-bind, ng-controller, ng-model, etc., are the examples of Directives. Here the prefix ng represents “Angular”.
You can use ng-bind as data-ng-bind, ng_bind, ng:bind, x-ng-bind. But the good practice is ng-bind.

2. Controllers

In AngularJS Controllers are defined by JavaScript constructor function. It is used to controller Application data. The controller has very important property which is $scope . The controller should be light weight and shouldn’t add too much works here.

Mainly use controller for,
1.     Set up the initial state of $scope Object.
2.     Adding behavior (methods) to the $scope object.
All the controllers are attached with HTML  DOM via ng-controller directive.

For example,
<div ng-controller=”myCtrl”></div>

3.Scopes

$Scope is a regular JavaScript Object. It refers to the application data model. Scope is a property of controller. The scope may contain any kinday of data. All the inputs and responses are passed via the $scope. The Scope is available in both view and controller.

In view, the Scope attached with ng-bind directive or  via the expression {{}}

4.Services

In AngularJS Services are objects. The services are implemented in any controller via Dependency Injection. Once we injected the services into the controller, we can start to use. There are plenty of inbuilt services and also you can create custom services via the module. The services are start with “$”.


Examples of services are,
$http, $location, $timeout, $interval etc.,


5. Dependency Injection


Dependency Injection is software design pattern in which components are given dependencies to other components. Instead of rewrite the code from scratch, we can reuse via Dependency Injection. 

To know more about the other components in AngularJS, Click Here.

Tuesday 28 February 2017

AngularJS Introduction



AngularJS is a structural Client side JavaScript Framework for develops Powerful Web Applications. It Supports MVC pattern in Front-end Applications. AngularJS use HTML as Template (view) Language. Also AngularJS allows users to extend existing HTML syntax to access many built in Function. Its called as Directives.

AngularJS is complete client side solution and this application only runs through web browsers only. AngularJS was Developed by Misko Hevery a Google Employee and Maintained by Google. Its also called as Single Page Application (SPA).


There are plenty of Front-end frameworks are available in the Web World. All the frameworks have some pros and cons. So the question may arise What’s special in AngularJS ?

Yes!! AngularJS allows its developer to write less code to get more functionality. Also it provides a magical function of Two-way Data Binding.

Most of the frameworks implement MVC by asking Developer to split the application in MVC components. Then the developer has to write the code to work together again. That’s a plenty of work. AngularJS implements MVC by asking Developer to split the application into MVC Components and then AngularJS do the Rest of the things. No need to write code again to work together again.

AngularJS have many directives and each directive do different functions. The amazing feature of Angularjs is you can call the function from your template. Since it supports two-way data binding. The directives allows you to use it as regular HTML Syntax.


AngularJS comes with many features.
1.     Two-way Data Binding.
2.     Provides more reusable components.
3.     You can create a template and you can reuse it in the application multiple times.
4.     Without writing a single code, you can validate the form even before you submit the form.
5.     You can directly call the business login from HTML using expression {{}}
6.     AngularJS allows you to control the complete HTML DOM structure.
7.     Starting an AngularJS Application is very easy.
8.     It support client side MVC Structure.
9.     In AngulrJS, your templates are treated as strings.
10. It provides plenty of Services, Directives, Filters, providers etc.,
11.Also it allows you to create custom services, directives, filters, providers etc.,


1.     Quick Start.
2.     Write less code for get more things.
3.     Time Saving.
4.     Better performance for large scale Applications.
5.     Rich UI.
6.     Fewer Codes.

To know more about the AngularJS, Please visit AngularJS all Topics.

Disadvantages of AngularJS

1. Confusion:

There are multiples ways to execute the same thing with AngularJS. So sometimes the developer may get confusion and hard to choose the better way.

2. Not afford for all the situations:

AngularJS is a framework of JavaScript, if someone’s browser disabled JavaScript means, the application is not Degradable. Then the user will get plain html page with raw AngularJs Code.

Just take a glance about the Booming framework Angularjs Here.