dimanche 26 juillet 2015

ember js this.set() breaking bootstrap plugins

on didInsertElement i have initialised bootstrap popover and it works fine until i run an action i.e submit a form, after i save the form data on db i make a request to get the current saved data from api and then i use this.set() to update the model in realtime for the user... however after i use this.set() the popover breaks... to explain it a little better i'm gonna use an example below:

<form {{action 'saveForm' checklist.id on='submit'}}>
   {{input type="text" value=firstName class="form-control" placeholder="Firstname"}}
   <button type="submit" class="btn btn-success" >Submit</button>
</form>

{{#each firstname in model.firstNames}}
  <span data-toggle="popover" data-title="Firstname" data-content="{{unbound firstname}}" data-placement="top">Firstname</span>
{{/each}}

after using this.set() the popover inside #each doesn't work anymore..




Aucun commentaire:

Enregistrer un commentaire