# Primeira tentativa de componente. Tentei criar um Nav Button Highlighter. Ainda não está funcionando

**URL:** https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090
**Category:** Development
**Created:** [Novembro 11, 2025, 2:47am UTC](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090 "2025-11-11T02:47:59Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [Novembro 11, 2025, 5:12am UTC](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090/2 "2025-11-11T05:12:52Z")

</div>

Aqui está algo que vejo rapidamente: você deve mover seu script para um arquivo inicializador dedicado, em `javascripts/discourse/api-initializers/script.js`.

---

_[View the full topic](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090)._
