I use jQuery to retrieve content from the database with a json request. It then replaces a wildcard in the HTML (like %title%) with the actual content. This works great and
Google appears to have a near-fully or fully functional javascript-crawling bot at the time of this answer:
In 2009 Google proposed a solution for making AJAX crawlable: https://webmasters.googleblog.com/2009/10/proposal-for-making-ajax-crawlable.html
In 2015 Google deprecated the above approach: https://webmasters.googleblog.com/2015/10/deprecating-our-ajax-crawling-scheme.html
I have successfully built multiple single page applications that are correctly rendered in Google's Webmaster tools.
There are lots of resources on the web if you want to dive deeper: