AngularJS : Syntax and Services
Double curly syntax interpolation
Services include business logic and connect to external resources – like RESTful web services – a Services thus correspond to the model in the MVC. Services are instantiated as Singleton.
AJAX requests are carried out in AngularJS as $http object and $resource object. Internal access to the XMLHttpRequest object differ in the degree of abstraction. While $http arbitrary HTTP requests can make is $resource specializing in REST services. In addition, there are specialized services from some third parties.
The controller can communicate with other controllers or services that may be from $scope or from $rootScope and $broadcast methods are available. $emit send messages to all the parent scopes, while $broadcast serves messages to child scopes.
Routes in single-page applications
In order to define routes in single-page application (SPA), which is the purpose of ngRoute module. This routes can be defined. The ngRoute module can dynamically reload an element with the ng-view directive.
AngularJS : Sample Application
Follow the Author of this article :