Angularjs Examples

AJS Examples


AngularJS $location Service

The AngularJS $interval service is similar to JavaScript's window.setInterval function. In angular it is refer to it through the $interval service. The $interval is just wrapper for window.setInterval function so that it will be easy to override, remove or mocked for testing.

The AngularJS $location Service is similar to window.location object and exposes the current URL in the browser address bar. The $location makes the URL available to your application. Any changes to the URL in the address bar are reflected into $location service and vice versa.

Syntax

AngularJS $location Service Example