These are chat archives for GetmeUK/ContentTools

29th
May 2016
Vanderhaegen
@jonasvanderhaegen
May 29 2016 11:11
is ContentTools compatible with vue / angular routing that someone knows off or have figured it out? i'm having multiple written articles, when I go to one article it's okey, if I then continue to the next article and edit that, save -> it saves the previous visited and current one with the same data by their id's.

when I come on the article I load the data via ajax, following this.editor.init('*[data-editable]', 'data-name');
this.editor.bind('save', function(regions) { self.updatePost(regions) });

when I leave the page I this.editor.destroy() it, I see the ct-app div going away.

Anthony Blackshaw
@anthonyjb
May 29 2016 12:40
@oodavid loved the video of what your working on - do let me know once you have something you'd want to promote as I'd love to feature the project on the CT site.
Anthony Blackshaw
@anthonyjb
May 29 2016 12:50
@jonasvanderhaegen are you using the latest version of CT (1.2.5)? If you re-init after each article load and destroy prior to each new article load I can't think why the previous regions would still be present (the stop method actually clears the regions e.g self._regions = {}) can you provide your source on gist to look at?
Vanderhaegen
@jonasvanderhaegen
May 29 2016 14:46
nope, was with v0.1.0. I'll give the newer version a try first.
well it's not really a region where i'm getting the article's id from, it's stored in an object in vue data. could give that a try as well.
Vanderhaegen
@jonasvanderhaegen
May 29 2016 15:57
If i put the id in a region instead of component data that would fix it?