refactor: move DOCUMENT from platform/browser to common
This commit is contained in:
parent
72747e5213
commit
2a7ebbe982
|
@ -15,6 +15,7 @@ export * from './location/index';
|
||||||
export {NgLocaleLocalization, NgLocalization} from './localization';
|
export {NgLocaleLocalization, NgLocalization} from './localization';
|
||||||
export {CommonModule} from './common_module';
|
export {CommonModule} from './common_module';
|
||||||
export {NgClass, NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet} from './directives/index';
|
export {NgClass, NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet} from './directives/index';
|
||||||
|
export {DOCUMENT} from './dom_tokens';
|
||||||
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe} from './pipes/index';
|
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe} from './pipes/index';
|
||||||
export {PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi} from './platform_id';
|
export {PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi} from './platform_id';
|
||||||
export {VERSION} from './version';
|
export {VERSION} from './version';
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/**
|
||||||
|
* @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';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A DI Token representing the main rendering context. In a browser this is the DOM Document.
|
||||||
|
*
|
||||||
|
* Note: Document might not be available in the Application Context when Application and Rendering
|
||||||
|
* Contexts are not the same (e.g. when running the application into a Web Worker).
|
||||||
|
*
|
||||||
|
* @stable
|
||||||
|
*/
|
||||||
|
export const DOCUMENT = new InjectionToken<Document>('DocumentToken');
|
|
@ -8,12 +8,14 @@
|
||||||
|
|
||||||
import {InjectionToken} from '@angular/core';
|
import {InjectionToken} from '@angular/core';
|
||||||
|
|
||||||
|
import {DOCUMENT as commonDOCUMENT} from '@angular/common';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DI Token representing the main rendering context. In a browser this is the DOM Document.
|
* A DI Token representing the main rendering context. In a browser this is the DOM Document.
|
||||||
*
|
*
|
||||||
* Note: Document might not be available in the Application Context when Application and Rendering
|
* Note: Document might not be available in the Application Context when Application and Rendering
|
||||||
* Contexts are not the same (e.g. when running the application into a Web Worker).
|
* Contexts are not the same (e.g. when running the application into a Web Worker).
|
||||||
*
|
*
|
||||||
* @stable
|
* @deprecated, import from `@angular/common` instead.
|
||||||
*/
|
*/
|
||||||
export const DOCUMENT = new InjectionToken<Document>('DocumentToken');
|
export const DOCUMENT = commonDOCUMENT;
|
||||||
|
|
Loading…
Reference in New Issue