Hello All,
I'm attempting to add the bootstrap 4 tooltip popovers. bootstrap suggests
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
I know I could just make it a live call on the body from app/routes/application.js#beforeModel, but I would rather make something to target specific elements instead of adding another watcher on the whole DOM.
I would like to do something like the below
<i class="fa fa-asterisk" {{tooltip}} title='Required'></i>
<i class="fa fa-asterisk" {{tooltip 'Required'}}></i>
<i class="fa fa-asterisk" {{tooltip direction='right'}} title='Required'></i>
<i class="fa fa-asterisk" {{tooltip 'Required' direction='right'}}></i>
At this time, I have no intent of making the content dynamic with <i class="fa fa-asterisk" {{tooltip tooltipString}}></i>
I would like this component/helper/modifier(?) to be like the {{action 'someAction'}} helper/modifier in the sense that it can live inside an element, add the attributes required, and not care what the element is or what else is happening with the element.
I've tracked down some of {{action ...}} in the ember/packages/... code and it led me to believe that {{action ...}} is not a helper but is an modifier and has a helper (if that even makes sense)
- It seems like action is a helper AND a modifier but I don't know what a modifier is or how to make one. Is there a place I can read more on this topic?
- If it's possible, how do I go about making this?
- is there a better way to do this? I'm likely overthinking this whole thing...
- are there any addons on EmberObserver which have code I may read to better understand how to do this?
To be honest, I'm still only a 4-6 months into Ember so any help in this would be amazing.
Also, I asked the slack channel, but I got no response. thus I turned here.
Thank you greatly 😄
Hello All,
I'm attempting to add the bootstrap 4 tooltip popovers. bootstrap suggests
I know I could just make it a live call on the
bodyfromapp/routes/application.js#beforeModel, but I would rather make something to target specific elements instead of adding another watcher on the whole DOM.I would like to do something like the below
<i class="fa fa-asterisk" {{tooltip}} title='Required'></i><i class="fa fa-asterisk" {{tooltip 'Required'}}></i><i class="fa fa-asterisk" {{tooltip direction='right'}} title='Required'></i><i class="fa fa-asterisk" {{tooltip 'Required' direction='right'}}></i>At this time, I have no intent of making the content dynamic with
<i class="fa fa-asterisk" {{tooltip tooltipString}}></i>I would like this component/helper/modifier(?) to be like the
{{action 'someAction'}}helper/modifier in the sense that it can live inside an element, add the attributes required, and not care what the element is or what else is happening with the element.I've tracked down some of
{{action ...}}in theember/packages/...code and it led me to believe that{{action ...}}is not a helper but is an modifier and has a helper (if that even makes sense)To be honest, I'm still only a 4-6 months into Ember so any help in this would be amazing.
Also, I asked the slack channel, but I got no response. thus I turned here.
Thank you greatly 😄