HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to render view from service not from controllers?
We are using the Vanilla-forum to build our platform. So I have a requirement, that I have to fetch the comments for a single discussion after when the single discussion page completely loads through ajax. I am able to fetch the comments but can't able to send it back to the render the view. Then the comments section will render from the ajax to the discussion's page. But we are using services folder where we are preparing/rearranging our data to return data directly to the controllers. So, my question here is I didn't found any way to render the view inside my services folder.
Thanks in advance!
0
Comments
I think you are trying to apply a different architecture to the framework. Can you give an overview of the architecture? I'm not following.
It is already possible to fetch the data in various forms through the controller ajax or not.
grep is your friend.
Can you please tell me how to fetch data through ajax?
I am able to fetch the data through ajax but not able to render data into the view. Not able to get the view?
Maybe you are looking for
?DeliveryType=VIEW&DeliveryMethod=JSON
.Those are http get parameters that you can use by simply attaching it to the url: https://open.vanillaforums.com/discussion/36476/how-to-render-view-from-service-not-from-controllers?DeliveryType=VIEW&DeliveryMethod=JSON