html - Embed javascript in angular ui-router view -
i'm sorry if has been answered, have no idea how search since seems specific.
i've got angularjs app using ui-router dynamically load multiple views same <ui-view> element. want use jquery ui's tooltip function on 1 of h3 elements loaded dynamically ui-router, don't know put initializer such runs after h3 in dom.
things i've tried:
- embedding
<script>tag in html partial calls$("h3").tooltip() - putting script tag in main parent html template - , without
document.readywrapper - putting
tooltip()function call in 1 of angular js files that's loading partial (when changed linealert(), seemed code running right before partial rendered, there no<h3>s yet)
i'm confused how can run arbitrary javascript code on dynamically loaded elements ... think first method should have worked. when make <script> tag contain simple alert(), nothing happens.
any ideas? i'm happy provide more information, think can't show actual code due nda.
may these you:
Comments
Post a Comment