Using a Discourse component in a plugin

buildArgs is only used for our widgets.

I did a quick search through our codebase and I couldn’t find an action being passed in either which is quite interesting, which tells me that most plugins just operate on the objects they are working on!

Having said that, it would look like this:

{{plugin-outlet 
  name="some-outlet" 
  args=(hash model=model someAction=(action "someAction"))}}

Then in your component you could do this.attrs.someAction()

1 Like