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:
vikerman
2017-02-14 16:14:40 -08:00
committed by Igor Minar
parent 2f2b65bd38
commit b4d444a0a7
39 changed files with 462 additions and 187 deletions

View File

@ -14,9 +14,8 @@ import {expect} from '@angular/platform-browser/testing/matchers';
export function main() {
describe('Meta service', () => {
const metaService: Meta = new Meta(getDOM());
const doc: HTMLDocument = getDOM().defaultDoc();
const doc: HTMLDocument = getDOM().createHtmlDocument();
const metaService: Meta = new Meta(doc);
let defaultMeta: HTMLMetaElement;
beforeEach(() => {