With JavaScript websites you can have the added complexity of sometimes serving signals that may be contrasting. For example, your HTML may include a canonical that is different to that in the rendered DOM. In this situation, you are forcing Google to make a choice about if the page should rank and then which page should rank for a given term. For SEO purposes, you want to make sure that all signals are as consistent and as easy for Google to understand as possible.
When working with one of our clients we noticed that different URLs were resolving with and without JavaScript (with and without trailing slash). With JS disabled the non-trailing slash URL was resolving, with JS enabled, this URL would redirect to the trailing slash version.
No JS – example.com/test – resolves
With JS – example.com/test 301 – redirects to example.com/test/
A common issue we have seen with Angular websites is pages returning different status codes depending upon whether they are navigated to from the site, or visited directly. This is a big problem for SEO (as well as users!).
This meant that both were being indexed and competing in the SERPs – not great for SEO!