I am reading all the articles on making a site crawlable by replacing Angular hashbangs in the URL with an escaped fragment. An example of such a tutorial:
http://lawsonry.com/2014/05/diy-angularjs-seo-with-phantomjs-the-easy-way/
However, the Angular app I'm maintaining is not truly a SPA (it uses no dynamic routing and no hashbangs in the URL); it has a conventional URL structure. However, each page's individual content is highly dynamic and is built up with client-side Javascript and AJAX calls to a web service. So I still need to figure out a crawlability solution but without the ability to use escaped fragments in the URL. Any advice?
What if I create a process to generate a sitemap.xml file nightly - and even loop through all the site URLs and prerender them into a folder full of static HTML files? The only missing piece is how to then be smart enough to serve up the static HTML to crawlers, while leaving the existing browser experience intact for human users. Can I simply add sitewide code to detect crawlers by checking the user-agent, and have it serve up the prerendered content in those cases? Or will this trigger red flags in Google's engine, thinking that I'm trying to "fool" it?