I want to use custom params in plugin-outlet

In my plugin “SearchUserWithUserFilelds”.

~javascript/template/my_plugin.hbs

<div id="search-result" class="search-result">
    {{#each filtered_users as |user|}}
      {{user-info user=user}}
    {{/each}}
  </div>

I would like to put the information of user-fields in user-info.
At this time
in connectors/after-user-name/user_detail.hbs

<div class="search-detail">{{user.user_fields1}}</div>
<div class="search-detail">{{user.user_fields2}}</div>
<div class="search-detail">{{user.user_fields3}}</div>

I want to prepare a Boolean that determines whether or not to display each UserFieldsInformation.
In the future, though, I’ll provide a checkbox to show or hide. But for now, this is just a test.

I have tried the following.
~controllers/my_plugin.js.es6

export default Ember.Controller.extend({
  display_user_filed1:true,
  display_user_filed1:true,
  display_user_filed1:true
});

and rewrite connectors/after-user-name/user_detail.hbs

{{#if display_user_field1}}<div class="search-detail">{{user.user_fields1}}</div>{{/if}}
{{#if display_user_field2}}<div class="search-detail">{{user.user_fields2}}</div>{{/if}}
{{#if display_user_field3}}<div class="search-detail">{{user.user_fields3}}</div>{{/if}}

At this time, UserFieldsInformation is no longer displayed.

In conclusion.
In plugin-outlet, How can I use the param of the parent controller(?) in plugin-outlet?

I think I don’t understand Ember well enough.
I would be very happy to get your answer.

1 Like