From 6014b07394b96dd68550486841d1b8500afca955 Mon Sep 17 00:00:00 2001 From: gustavo Date: Sat, 26 Sep 2015 00:55:25 +0200 Subject: [PATCH] showcase: ngdoc improvements --- angularjs/showcase/src/showcase/app/cars/cars.service.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/angularjs/showcase/src/showcase/app/cars/cars.service.js b/angularjs/showcase/src/showcase/app/cars/cars.service.js index 6b1c7cd..9a78a49 100644 --- a/angularjs/showcase/src/showcase/app/cars/cars.service.js +++ b/angularjs/showcase/src/showcase/app/cars/cars.service.js @@ -38,6 +38,8 @@ * * @description * Get cars from API REST. + * + * @returns {Promise} Promise that will be resolved or rejected when $http responds. */ function getAll() { return $http.get(API.CARS) @@ -223,6 +225,8 @@ * * @description * Get one car by its id from API REST. + * + * @returns {Promise} Promise that will be resolved or rejected when $http responds. */ function getById(id) { expectedValue = $http.get(API.CAR.replace(':carId', id)); @@ -230,6 +234,16 @@ return expectedValue; } + /** + * @ngdoc method + * @name getExpectedValue + * @methodOf app.cars.cars + * + * @description + * Returns expected value as promise. + * + * @returns {Promise} Promise that will be resolved or rejected when $http responds. + */ function getExpectedValue() { return expectedValue; } -- 2.1.4