@ewaschenko wrote:
Hi, I have an edit controller with a few fields and a tags input. Essentially, when I load the route I initialize my variables and after
{{input type="text" class="form-control" id="crTags" value=crTags placeholder="Enter tags"}}
I have
{{initDash}}
with
initDash: Ember.computed(function(){
$('#crTags').tagsInput();
}),
to initialize the tags input.The problem is when I navigate away from the page and return back, the initDash is not called, therefore the tagsInput does not run. From what I understand Ember controllers are singletons and therefore do not refresh entirely if the app returns to it.
I was wondering how I can call$('#crTags').tagsInput();
after the html has been inserted regardless of whether or not this is the first or multiple time visiting the page.
Posts: 1
Participants: 1