In Angular2 With Bootstrap - Tooltip, Tooltip Need setup by executing javascript, How to do it? -
angular2 (2.0.0-rc.4) use bootstrap's tooltip, tooltip need execute follow javascript when ready:
$(function () { $('[data-toggle="tooltip"]').tooltip() })
in angular2,how execute it?
<div data-toggle="tooltip" #tooltip></div>
class mycomponent { @viewchild('tooltip') tooltip:elementref; ngafterviewinit() { this.tooltip.nativeelement.tooltip(); } }
Comments
Post a Comment