Angular 서비스
Angular.js 라이브러리를 사용하면서 컨트롤러의 매개변수로 입력한 $http, $scope를 서비스라고 합니다.
서비스는 매개변수의 순서에 상관없이 컨트롤러의 매개변수로 입력합니다.
예)
function basicController($scope, $http,$controller, $parse, $window){
}
$compile -
$filter -
$http - get(), post(), put(), del(), jsonp()
예)
function basicController($scope, $http){
$http({
method: 'GET',
url: 'HTMLPage.html'
}).success(function(data, status){
console.log(data);
});
}
<div ng-controller="basicController"></div>
$locale -
$log -
$parse -
$q -
$route -
$scope - scope is an object that refers to the application model. It is an execution context
for expressions. Scopes are arranged in hierarchical structure which mimic the DOM
structure of the application. Scopes can watch expressions and propagate events.
[scope inheritance]
Root Scope > Controller Scope > Repeater Scope
$timeout -
$window -