Showing posts with label AngularJS Providers. Show all posts
Showing posts with label AngularJS Providers. Show all posts

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, 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.