mrvdot / angular-comments

Multi Platform commenting component for AngularJS
MIT License
13 stars 2 forks source link

Comments wont load on consecutive posts loaded from WP. Only first post loaded. #1

Open iamlasse opened 11 years ago

iamlasse commented 11 years ago

Hi, I just added it in my script load sequence, setup the config and module as per instructions and added the directive in the blog post template, that is being loaded with the $stateProvider. I've tried these 2 ways to get the comments to display 1) div comments="post.content.ID">

" AND 2) div comments="post">
" where post is pulled from wordpress and is an object on the scope holding only { slug: ..., title: ..., url: ...}. As far as the refresh I'm not sure at all how to go about that... I'm still learning angular. My config is: commentConfig .setForumName("lasselarsen")//Specify our forum name/site id for this site .setProvider('disqus')//Specify we want to use disqus Where would I add the refresh function? In the controller, or...? What would be good practice? I'm trying to learn how to not do spaghetti code and keep things as dry as possible.

Its not refreshing when you switch between posts, and the post comments are the same for all posts, it doesnt seem like it knows to which post a comment belongs... So after looking more into it, the comments are not registered, it just says "untitled" in disqus. I have created a separate object on the scope exactly like the $scope.article = {slug: ..., etc } in instructions but nothing seems to work.

It seems like "threadLoaded" never becomes true when I load a different post, as well as if I click the directive in the dom I get this JS error : Cannot call method 'appendChild' of null.

mrvdot commented 11 years ago

Hey Lasse,

Thanks for the info. Can you provide either the URL of the site where you're implementing this or the code you're using for switching posts? (Or are you just loading multiple posts in a scrolling list and scrolling down the page?).

Alex

iamlasse commented 11 years ago

Hi Alex,

Sorry for my absense, I have implemented it here www.thesexiestnonprofitever.org and i switched to livefyre to try again. It keeps switching between 404 errors on load and when i post a comment it wont register the url or slug to link the comment to the post...

iamlasse commented 11 years ago

Hello again Alex,

I'm soooo close now lol i implemented it here as well http://www.lasselarsen.me/#/posts/ and i can now get it to recognize the slug but the url gets screwed up as well as the thread is still not updating on post change.