Google bot and other cralwers can't execute javascript, they will request your page and just index whatever is there in the html. You can read more about it here Google's Crawler Guidelines
What you have to do is provide to Google and other search engines a static version of your website
You have some alternatives to solve this problem.
Paid service
This is the easiest way to generate and serve google with a static version of your website, here are some providers prerender.io, Brombone, seo4ajax, you can google for more providers.
Some of them have a free plan that would fit your needs better.
Make your own service to generate static web pages
You can build your own solution to generate your static pages learn here.