From da7342fbf187b24db70c14e3d2e3fb6b25689d74 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Thu, 29 Oct 2015 13:22:32 +0200 Subject: [PATCH 1/2] docs($templateRequestProvider): make the description more generic and fix link --- src/ng/templateRequest.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ng/templateRequest.js b/src/ng/templateRequest.js index 5cea2696c802..2a7c89945ecc 100644 --- a/src/ng/templateRequest.js +++ b/src/ng/templateRequest.js @@ -5,8 +5,12 @@ var $compileMinErr = minErr('$compile'); /** * @ngdoc provider * @name $templateRequestProvider + * * @description - * Used to configure the Accept header that is sent to the server when requesting a template. + * Used to configure the options passed to the {@link $http} service when making a template request. + * + * For example, it can be used for specifying the "Accept" header that is sent to the server, when + * requesting a template. */ function $TemplateRequestProvider() { @@ -16,10 +20,10 @@ function $TemplateRequestProvider() { * @ngdoc method * @name $templateRequestProvider#httpOptions * @description - * The options to be passed to the $http service when making the request. - * You can use this to override options such as the Accept header for template requests. + * The options to be passed to the {@link $http} service when making the request. + * You can use this to override options such as the "Accept" header for template requests. * - * The {$templateRequest} will set the `cache` and the `transformResponse` properties of the + * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the * options if not overridden here. * * @param {string=} value new value for the {@link $http} options. From dde0504ecb23e1eac2d71bca7b4e10f1fe233748 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Thu, 29 Oct 2015 13:24:55 +0200 Subject: [PATCH 2/2] test($templateRequest): remove unused dependencies --- src/ng/templateRequest.js | 1 - test/ng/templateRequestSpec.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ng/templateRequest.js b/src/ng/templateRequest.js index 2a7c89945ecc..59cba2e77d4b 100644 --- a/src/ng/templateRequest.js +++ b/src/ng/templateRequest.js @@ -5,7 +5,6 @@ var $compileMinErr = minErr('$compile'); /** * @ngdoc provider * @name $templateRequestProvider - * * @description * Used to configure the options passed to the {@link $http} service when making a template request. * diff --git a/test/ng/templateRequestSpec.js b/test/ng/templateRequestSpec.js index e572d40fbc5b..16ac22468809 100644 --- a/test/ng/templateRequestSpec.js +++ b/test/ng/templateRequestSpec.js @@ -31,7 +31,7 @@ describe('$templateRequest', function() { function someTransform() {} - module(function($templateRequestProvider, $httpProvider) { + module(function($templateRequestProvider) { // Configure the template request service to provide specific headers and transforms $templateRequestProvider.httpOptions({ @@ -58,7 +58,7 @@ describe('$templateRequest', function() { var httpOptions = {}; - module(function($templateRequestProvider, $httpProvider) { + module(function($templateRequestProvider) { $templateRequestProvider.httpOptions(httpOptions); });