Reactive inline scripts in templates with flow-router


#1

Not exactly what I am looking for, but quite the opposite. My issue is that I couldn’t get my semantic-ui popups working on onRendered, so I just put those inline with <script> tags after the template each loop.

All good, except now I have a refresh function mounted to a button + several cron jobs that refresh that same loop and if anything updates the template {{#each}} the popups are gone. I tried putting the scripts in helper, in onCreated, onRendered, within a tracker autoruns, but nothing works. I thought the issue was because I use subs manager along with the meteor subscriptions and my each is within a isReady helper like this

isReady: function () {
    return (FlowRouter.subsReady() && SubsMgr.ready());
}

but even after removing it it won’t work again. How can I make those scripts work on reactive update ?