# How to access current post tags using Ember and JavaScript?

**URL:** <https://meta.discourse.org/t/how-to-access-current-post-tags-using-ember-and-javascript/53354>\
**Category:** Development\
**Created:** [25 Noviembre, 2016 04:06 UTC](https://meta.discourse.org/t/how-to-access-current-post-tags-using-ember-and-javascript/53354 "2016-11-25T04:06:55Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Jay\_Crossler](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jay_crossler/32/121395_2.png) [@Jay\_Crossler](https://meta.discourse.org/u/Jay_Crossler)\
**Post date:** [26 Noviembre, 2016 20:03 UTC](https://meta.discourse.org/t/how-to-access-current-post-tags-using-ember-and-javascript/53354/5 "2016-11-26T20:03:25Z")

</div>

That was very helpful (after I read through 5 Ember tutorials and 1 on es6). Here’s what I came up with for others if they need it (in /plugins/myplugin/assets/javascripts/discourse/initializers/listener.js.es6):

```
import { withPluginApi } from 'discourse/lib/plugin-api';
import { observes } from "ember-addons/ember-computed-decorators";

function initializeIntelligentTagger(api) {
  const ComposerController = api.container.lookupFactory("controller:composer");
  ComposerController.reopen({
    editPostItem: function () {
      console.log(this.get('model.title'));
      console.log(this.get('model.reply'));
    }.observes('model.reply')
  });
}

export default {
  name: "add-intelligent-tagger",
  initialize() {
    withPluginApi('0.0.1', initializeIntelligentTagger);
  }
};

```

Critiques would be appreciated. Next, I’ll work on the ajax call to guess at tags. I’m thinking of first removing the top 10k most common words, then have a lookup table for v1, then feed it to a deep-learning algorithm to train for v2) - hints welcome.

---

_[View the full topic](https://meta.discourse.org/t/how-to-access-current-post-tags-using-ember-and-javascript/53354)._
