I see you have placed these samples under Communities, However in JS these are under Forums.
Communities actually look better to me since api is in CommunityService. Can you confirm with Mark once ?