mohan.gade
mohan.gade

Reputation: 1105

Is their any way to call ember-selectize action into controller?

I am new to ember development. I have to call action on the ember-selectize, but I am not getting where to write that action code?

//template

{{ember-selectize
          id = property
          content = studentNames
          optionValuePath = "content.id"
          optionLabelPath = "content.name"
          placeholder = "Select a name"
          select-item=(action 'displayStudentName')
       }}

//Can we write the method displayStudentName in controller?

Thanks!

Upvotes: 0

Views: 217

Answers (1)

Andrew B
Andrew B

Reputation: 1

For select-item you only have to pass in the name of the action as a string.

select-item='displayStudentName'

Upvotes: 0

Related Questions