Super, super new to Ember, so apologies if this is straight forward. I want to know the best way to dynamically change properties in a CSS class rendered within a component.
I made a component, like so:
//route_template.hbs
{{map-view point=model}}
And I pass through point, which has two coordinate properties: model.xCoordinate, and model.yCoordinate.
Here's my component template. You can see I am currently using this hacky inline styling to style the point location on the page:
//component_template.hbs
{{#each point as |mapPoint|}}
<i class="point-icon" style={{html-safe (concat 'left:' mapPoint.xCoordinate 'px; top:' mapPoint.yCoordinate 'px;')}}></i>
{{/each}}
I know: gross. Is there a better way to do this? Should I make a handlebars helper? An action? If someone could just point me in the general direction, I can take it from there. Thanks so much!