feat(platform-server): add API to render Module and ModuleFactory to string (#14381)
- PlatformState provides an interface to serialize the current Platform State as a string or Document. - renderModule and renderModuleFactory are convenience methods to wait for Angular Application to stabilize and then render the state to a string. - refactor code to remove defaultDoc from DomAdapter and inject DOCUMENT where it's needed.
This commit is contained in:
@ -223,7 +223,7 @@ function _extractToken(
|
||||
|
||||
if (!Array.isArray(metadata)) {
|
||||
if (metadata instanceof Inject) {
|
||||
return _createDependency(metadata.token, optional, null);
|
||||
return _createDependency(metadata['token'], optional, null);
|
||||
} else {
|
||||
return _createDependency(metadata, optional, null);
|
||||
}
|
||||
@ -238,7 +238,7 @@ function _extractToken(
|
||||
token = paramMetadata;
|
||||
|
||||
} else if (paramMetadata instanceof Inject) {
|
||||
token = paramMetadata.token;
|
||||
token = paramMetadata['token'];
|
||||
|
||||
} else if (paramMetadata instanceof Optional) {
|
||||
optional = true;
|
||||
|
Reference in New Issue
Block a user