2017-02-14 22:48:48 -05:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
|
|
|
import {InjectionToken} from '@angular/core';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Config object passed to initialize the platform.
|
|
|
|
*
|
2018-10-19 07:12:20 -04:00
|
|
|
* @publicApi
|
2017-02-14 22:48:48 -05:00
|
|
|
*/
|
|
|
|
export interface PlatformConfig {
|
|
|
|
document?: string;
|
|
|
|
url?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The DI token for setting the initial config for the platform.
|
|
|
|
*
|
2018-10-19 07:12:20 -04:00
|
|
|
* @publicApi
|
2017-02-14 22:48:48 -05:00
|
|
|
*/
|
|
|
|
export const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL_CONFIG');
|
2017-09-04 03:38:42 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A function that will be executed when calling `renderModuleFactory` or `renderModule` just
|
|
|
|
* before current platform state is rendered to string.
|
|
|
|
*
|
2018-10-19 07:12:20 -04:00
|
|
|
* @publicApi
|
2017-09-04 03:38:42 -04:00
|
|
|
*/
|
|
|
|
export const BEFORE_APP_SERIALIZED =
|
|
|
|
new InjectionToken<Array<() => void>>('Server.RENDER_MODULE_HOOK');
|