Open givanse opened 9 years ago
@givanse thanks for the feedback! This was really just me experimenting with making an ember addon. I agree that this could be accomplished very easily with a helper. I will look into converting this to a helper to remove the overhead from Ember.Component.
In the mean time, I've updated the component to use an img
tag and get rid of the unnecessary div
(https://github.com/adamsrog/ember-cli-placeholdit/commit/5860b6ca9083e3d09313bbf77dcdafaac9447340).
{{placehold-it class="custom-class" width=200 height=100}}
will now output...
<img id="ember385" class="ember-view custom-class" src="http://placehold.it/200x100/aaa/555">
Thank you :+1:
I think that a component is overkill for this type of thing, a helper should suffice.
If I do this:
The image is added like this:
What I expected was:
No div, no view/controller. Just an HTML tag, so a helper would be more appropriate. And of course, it should give us the ability to pass a CSS class.
Something like this: http://emberjs.com/guides/templates/writing-helpers/