The service will helps to fetch data from the database when to share the data between controllers.
If we store the data inside a controller, once we change to another controller the data will be discarded.
AngularJS has 30 built in services.
Types of Services in AngularJS
-
Built-in Services: The angularjs has inbuilt services. That’s is core services.
The built in services like $http, $log, $location etc..
The inbuilt services are always prefixed with $. - Custom Services: These services are developed by developers to achieve certain business logic in the form of service.
The $http Service
The $http is the one of the inbult services in angularjs. It is commonly used services in angularjs application.
Example
Use the $http service to request data from the server:
Today's welcome message is:
{{myWelcome}}
From the above code we can clearly say that: The $http service requests a page on the server, and the response is set as the value of the “myWelcome” variable.
The $location Service
The $location service has methods which return information about the location of the current web page:
Example
The url of this page is:
{{myUrl}}
where can i get clomiphene without prescription generic clomid online order cheap clomiphene pill cost of clomid without a prescription can i buy cheap clomid tablets get cheap clomiphene pills can i buy cheap clomid without prescription
На этом сайте можно найти онлайн игры на разные предпочтения.
В разделах собраны разнообразные жанры: от шутеров до стратегий.
Играйте соло или в многопользовательском режиме — всё доступно.
Простой интерфейс и быстрый доступ игр точно оцените.
Загляните и выберите подходящую игру уже сегодня!
http://cowcreekranch.com/__media__/js/netsoltrademark.php?d=bundas24.com%2Fread-blog%2F188807
На данном сайте вы сможете найти подробную информацию о лекарственном средстве Ципралекс. Вы узнаете здесь сведения о показаниях, дозировке и возможных побочных эффектах.
http://OstrovGlyadkiyNosRussianFederation.auio.xyz/category/website/wgI2vZFhZf5rbhFqBTP7G0CD1
На данном сайте можно найти информацией о решениях видеонаблюдения, разновидностях и ключевых характеристиках. Здесь представлены полезные сведения о выборе оборудования, монтаже и конфигурации.
видеонаблюдение
Hey there! Do you know if they make any plugins to assist with
Search Engine Optimization? I’m trying to get my website to
rank for some targeted keywords but I’m not seeing very good success.
If you know of any please share. Thank you!
You can read similar blog here: Wool product