/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/core/src/core.ts
151 строка
6 KB
leonsenft
refactor(core): add context support for foreign components (#69502)
30 июн 2026, 03:34
30 июн 2026, 03:34
555fc20
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC 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.dev/license */ /** * @module * @description * Entry point from which you should import all public core APIs. */ export * from './authoring'; // Authoring functions are exported separately as this file is exempted from // JSCompiler's conformance requirement for inferred const exports. See: // https://docs.google.com/document/d/1RXb1wYwsbJotO1KBgSDsAtKpduGmIHod9ADxuXcAvV4/edit?tab=t.0 export {input} from './authoring/input/input'; export {model} from './authoring/model/model'; export {contentChild, contentChildren, viewChild, viewChildren} from './authoring/queries'; export { AnimationCallbackEvent, AnimationFunction, MAX_ANIMATION_TIMEOUT, } from './animation/interfaces'; export {ApplicationConfig, mergeApplicationConfig} from './application/application_config'; export { APP_INITIALIZER, ApplicationInitStatus, provideAppInitializer, } from './application/application_init'; export {ApplicationModule} from './application/application_module'; export { APP_BOOTSTRAP_LISTENER, ApplicationRef, BootstrapOptions, } from './application/application_ref'; export { ANIMATION_MODULE_TYPE, APP_ID, CSP_NONCE, PLATFORM_ID, PLATFORM_INITIALIZER, } from './application/application_tokens'; export {REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, ResponseInit} from './application/platform_tokens'; export {provideStabilityDebugging} from './application/stability_debug_impl'; export * from './change_detection'; export {provideCheckNoChangesConfig} from './change_detection/provide_check_no_changes_config'; export { NgZoneOptions, provideZoneChangeDetection, } from './change_detection/scheduling/ng_zone_scheduling'; export {provideZonelessChangeDetection} from './change_detection/scheduling/zoneless_scheduling_impl'; export * from './core_private_export'; export * from './core_reactivity_export'; export * from './core_render3_private_export'; export { asNativeElements, DebugElement, DebugEventListener, DebugNode, getDebugNode, Predicate, } from './debug/debug_node'; export {IdleService, provideIdleServiceWith} from './defer/idle_service'; export * from './di'; export {DOCUMENT} from './document'; export {ErrorHandler, provideBrowserGlobalErrorListeners} from './error_handler'; export {EventEmitter} from './event_emitter'; export { DEFAULT_CURRENCY_CODE, LOCALE_ID, MissingTranslationStrategy, TRANSLATIONS, TRANSLATIONS_FORMAT, } from './i18n/tokens'; // g3-only export {ForeignComponent} from './interface/foreign_component'; export {AbstractType, Type} from './interface/type'; export * from './linker'; export * from './linker/ng_module_factory_loader_impl'; export * from './metadata'; export {provideNgReflectAttributes} from './ng_reflect'; export {PendingTasks} from './pending_tasks'; export { assertPlatform, createPlatform, createPlatformFactory, destroyPlatform, getPlatform, providePlatformInitializer, createOrReusePlatformInjector as ɵcreateOrReusePlatformInjector, } from './platform/platform'; export * from './platform/platform_core_providers'; export {PlatformRef} from './platform/platform_ref'; export * from './render'; export {AfterRenderRef} from './render3/after_render/api'; export { afterEveryRender, afterNextRender, AfterRenderOptions, ɵFirstAvailable, } from './render3/after_render/hooks'; export {ComponentMirror, createComponent, reflectComponentType} from './render3/component'; export {enableProfiling} from './render3/debug/chrome_dev_tools_performance'; export {isStandalone} from './render3/def_getters'; export { Binding, DirectiveWithBindings, inputBinding, outputBinding, twoWayBinding, } from './render3/dynamic_bindings'; // g3-only export {provideForeignRootContext} from './render3/foreign_context'; // g3-only export {foreignImport} from './render3/foreign_import'; export {createEnvironmentInjector, createNgModule} from './render3/ng_module_ref'; export {publishNonCoreGlobalUtil as ɵpublishNonCoreGlobalUtil} from './render3/util/global_utils'; export * from './resource'; export {Sanitizer} from './sanitization/sanitizer'; export {SecurityContext} from './sanitization/dom_security_schema'; export { GetTestability, setTestabilityGetter, Testability, TestabilityRegistry, } from './testability/testability'; export {makeStateKey, StateKey, TransferState} from './transfer_state'; export {booleanAttribute, numberAttribute} from './util/coercion'; export {TypeDecorator} from './util/decorators'; export {DefaultExport} from './util/default_export'; export {enableProdMode, isDevMode} from './util/is_dev_mode'; export * from './version'; export * from './webmcp'; export * from './zone'; import {global} from './util/global'; if (typeof ngDevMode !== 'undefined' && ngDevMode) { // This helper is to give a reasonable error message to people upgrading to v9 that have not yet // installed `@angular/localize` in their app. // tslint:disable-next-line: no-toplevel-property-access global.$localize ??= function () { throw new Error( 'It looks like your application or one of its dependencies is using i18n.\n' + 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\n' + 'Please run `ng add @angular/localize` from the Angular CLI.\n' + "(For non-CLI projects, add `import '@angular/localize/init';` to your `polyfills.ts` file.\n" + 'For server-side rendering applications add the import to your `main.server.ts` file.)', ); }; }