docs(platform-server): fix renderModule usage guidance with Ivy (#37296)

Before the introduction of the Ivy renderer, users would compile
their applications and use the resulting factories for SSR, since
these post-compilation artifacts ensured faster delivery. Thus,
using the original module as the rendering entrypoint was
considered suboptimal and was discouraged.

However, with the introduction of Ivy, this guidance is no longer
applicable since these factories are no longer generated.
Comparable speed is achieved using the factory-less module
renderer, and so we update the guiance in the docs for the method.

PR Close #37296
This commit is contained in:
Adam 2020-05-26 12:49:50 -05:00 committed by Matias Niemelä
parent f001aef2dc
commit 98d820030c
1 changed files with 4 additions and 2 deletions

View File

@ -93,8 +93,10 @@ the server-rendered app can be properly bootstrapped into a client app.`);
* `url` is the URL for the current render request.
* `extraProviders` are the platform level providers for the current render request.
*
* Do not use this in a production server environment. Use pre-compiled {@link NgModuleFactory} with
* {@link renderModuleFactory} instead.
* If compiling with the ViewEngine renderer, do not use this in a production server environment.
* Use pre-compiled {@link NgModuleFactory} with {@link renderModuleFactory} instead. If
* compiling with the Ivy renderer, this method is the recommended rendering method for
* platform-server.
*
* @publicApi
*/