Is the difference between Angualr's AoT compilation and SSR rendering down to just data bindings?

728 Views Asked by At

In AoT compilation, the template code is converted to HTML code at the build time itself. In SSR (using Angular Universal) also, the final HTML is created before being sent to the browser.

Is the difference then, just that in SSR, the js-equivalent of TS-components are executed, which means that the values for any property inside them will be already present (and hence, input elements bound to those properties, would already have their values set in the final HTML sent to the server)?

On the other hand, in a simple AoT-compiled application, the HTML is there but the values bound to their elements are not set (which happens when the js files created from components, are run)

Is that how it happens? If yes, then shouldn't the tag also get converted into HTML elements when using plain AoT?

0

There are 0 best solutions below