# Aggregation is not shown in response with angularjs elasticsearch

**URL:** <https://discuss.elastic.co/t/aggregation-is-not-shown-in-response-with-angularjs-elasticsearch/58130>\
**Category:** Elasticsearch\
**Created:** [August 16, 2016, 12:06pm UTC](https://discuss.elastic.co/t/aggregation-is-not-shown-in-response-with-angularjs-elasticsearch/58130 "2016-08-16T12:06:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aqm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aqm/32/45742_2.png) [@aqm](https://discuss.elastic.co/u/aqm)\
**Post date:** [August 16, 2016, 12:06pm UTC](https://discuss.elastic.co/t/aggregation-is-not-shown-in-response-with-angularjs-elasticsearch/58130/1 "2016-08-16T12:06:59Z")

</div>

I am using angularjs Elasticsearch. I write aggregation query but it didn't give me aggregation in response. I used same query in Postman, I got correct result with aggregations. My code is given below

`

`

I only get shards and hits in my response..  
Is there any solution for this...

---

<div class="post-metadata">

**Author:** ![JoarSvensson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joarsvensson/32/8740_2.png) [@JoarSvensson](https://discuss.elastic.co/u/JoarSvensson)\
**Post date:** [August 17, 2016, 8:02am UTC](https://discuss.elastic.co/t/aggregation-is-not-shown-in-response-with-angularjs-elasticsearch/58130/2 "2016-08-17T08:02:38Z")

</div>

Hi, please provide the code/query snippet you're referencing.

---

<div class="post-metadata">

**Author:** ![aqm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aqm/32/45742_2.png) [@aqm](https://discuss.elastic.co/u/aqm)\
**Post date:** [August 18, 2016, 6:06am UTC](https://discuss.elastic.co/t/aggregation-is-not-shown-in-response-with-angularjs-elasticsearch/58130/3 "2016-08-18T06:06:29Z")

</div>

![](https://us1.discourse-cdn.com/elastic/original/2X/b/bca85dc8d845a39a268d518cf3e2f91566757729.png)

here is my code snipet

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/aggregation-is-not-shown-in-response-with-angularjs-elasticsearch/58130/4 "2017-07-05T22:27:05Z")

</div>


