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

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -