# SetUpComponent not being called for topic list tags plugin outlet

**URL:** <https://meta.discourse.org/t/setupcomponent-not-being-called-for-topic-list-tags-plugin-outlet/58358>\
**Category:** Development\
**Created:** [4. März 2017 um 17:20 UTC](https://meta.discourse.org/t/setupcomponent-not-being-called-for-topic-list-tags-plugin-outlet/58358 "2017-03-04T17:20:56Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

The discussion revolves around the SetUpComponent not being called for a topic list tags plugin outlet. [net_deamon](/t/-/58358/1) initially tried to add a plugin outlet for topic list tags, but was unable to get the corresponding js.es6 file to work. [tgxworld](/t/-/58358/2) pointed out that the `topic-list-tags` plugin outlet has been removed and suggested using the `plugin-api` instead.

[net_deamon](/t/-/58358/3) then tried using the `topic-list-after-title` plugin outlet and was able to view test text, but the SetUpComponent was not called. The js.es6 file was located at `my-plugin/javascripts/discourse/connectors/topic-list-after-title/test-topic-list-after-title.js.es6`, which should have triggered the SetUpComponent.

[spirobel](/t/-/58358/4) shared that they are experiencing the same issue and has not found a solution. They provided a link to a related discussion on adding computed properties to raw hbs outlets.

<div class="post-metadata">

**Author:** ![net\_deamon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/net_deamon/32/70126_2.png) [@net\_deamon](https://meta.discourse.org/u/net_deamon)\
**Post date:** [4. März 2017 um 17:20 UTC](https://meta.discourse.org/t/setupcomponent-not-being-called-for-topic-list-tags-plugin-outlet/58358/1 "2017-03-04T17:20:57Z")

</div>

If I add a plugin outlet in list item,  
`ie <plugin name>/assests/javascripts/discourse/templates/list/connectors/topic-list-tags/<unique name>.raw.hbs`

Where should I add the js.es6 file for this outlet?

I tried it in following location, but it didnt work

`ie <plugin name>/assests/javascripts/discourse/list/connectors/topic-list-tags/<unique-name>.js.es6`

```
export default {
  setupComponent(args, component) {
....
  }
}

```

---

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [6. März 2017 um 09:42 UTC](https://meta.discourse.org/t/setupcomponent-not-being-called-for-topic-list-tags-plugin-outlet/58358/2 "2017-03-06T09:42:11Z")

</div>

The `topic-list-tags` plugin outlet has been removed in

[https://github.com/discourse/discourse/commit/f918951d42234790938da442a768c2bf80f87069](https://github.com/discourse/discourse/commit/f918951d42234790938da442a768c2bf80f87069)

I believe you can add tags to the list via the `plugin-api`

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/plugin-api.js.es6#L394-L410](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/plugin-api.js.es6#L394-L410)

---

<div class="post-metadata">

**Author:** ![net\_deamon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/net_deamon/32/70126_2.png) [@net\_deamon](https://meta.discourse.org/u/net_deamon)\
**Post date:** [7. März 2017 um 15:54 UTC](https://meta.discourse.org/t/setupcomponent-not-being-called-for-topic-list-tags-plugin-outlet/58358/3 "2017-03-07T15:54:38Z")

</div>

Thanks for your reply. I see there is another plugin outlet “topic-list-after-title”.  
I added the raw.hbs file in the “topic-list-after-title” folder. I added some test text in the raw.hbs file, and I was able to view the same in the discourse site.

[But as mentioned here](https://meta.discourse.org/t/important-changes-to-plugin-outlets-for-ember-2-10/54136) , if we add corresponding js.es6 file and

```
export default {
  setupComponent(args, component) {
    component.set('today', new Date());
  }
}

```

the setUpComponent will be called before rending the hbs connector file.

But in my case, I am able to view the text, but the above function is not called.

raw.hbs file location : my-plugin/javascripts/discourse/templates/connectors/topic-list-after-title/test-topic-list-after-title.raw.hbs

js.es6 file location : my-plugin/javascripts/discourse/connectors/topic-list-after-title/test-topic-list-after-title.js.es6

---

<div class="post-metadata">

**Author:** ![spirobel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spirobel/32/170908_2.png) [@spirobel](https://meta.discourse.org/u/spirobel)\
**Post date:** [7. Februar 2020 um 12:14 UTC](https://meta.discourse.org/t/setupcomponent-not-being-called-for-topic-list-tags-plugin-outlet/58358/4 "2020-02-07T12:14:40Z")

</div>

Ich habe das gleiche Problem. Hast du eine Lösung gefunden?  
EDIT: Falls jemand nach einer Möglichkeit sucht, berechnete Eigenschaften zu diesen rohen HBS-Dateien für Ausgänge hinzuzufügen: [What is the difference between raw.hbs handlerbar files and only .hbs handlerbar files? - #4 by spirobel](https://meta.discourse.org/t/what-is-the-difference-between-raw-hbs-handlerbar-files-and-only-hbs-handlerbar-files/58565/4)
