Is it possible to implement progressive enhancement techniques with Angular 2? Maybe the server can render markup to display some content and then Angular will come along and take over the content elements once it finishes loading?
The idea is that you will have two entrypoints (i.e. two bootstrap modules) in your application - one for browser, another one - for server-side process. The server-side bootstrap module will override services that are browser-specific. For example, in browser version you may have a service that uses HTTP to fetch data, while the server version will fetch data directly from the database. When user requests your application from the server very first time, it will bootstrap your application on the server, and return generated static HTML page as the response. The page will include links to the application JS bundles. Once bundles are loaded and the browser version of you app is bootstrapped, the page becomes interactive.
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?