Skip to content

How to set data for components on server side? From models or database and etc. #18

Closed Answered by ivanvoitovych
xukku asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thank you for your question!

So, let's make one thing clear: Viewi is essentially your front-end application written in PHP. Therefore it acts pretty much the same as it would be written in Vue or Angular. Those frameworks use HttpClient (Angular) or fetch (Vue) to get the data.
Same goes here, Viewi has HttpClient on board:

HttpClient in Viewi

By using it, you can get any data you want from a server. It will act like AJAX in the browser, and will invoke API endpoint directly on the server during SSR.

I hope this answers your question. And I will gladly assist you if you need any help, just let me know.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ivanvoitovych
Comment options

@SOHELAHMED7
Comment options

@ivanvoitovych
Comment options

@SOHELAHMED7
Comment options

@ivanvoitovych
Comment options

Answer selected by ivanvoitovych
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #17 on January 29, 2022 13:28.