forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.ts
More file actions
126 lines (122 loc) · 4.39 KB
/
core.ts
File metadata and controls
126 lines (122 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**
* @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 {contentChild, contentChildren, viewChild, viewChildren} from './authoring/queries';
export {model} from './authoring/model/model';
export * from './metadata';
export * from './version';
export {TypeDecorator} from './util/decorators';
export * from './di';
export {
BootstrapOptions,
ApplicationRef,
NgProbeToken,
APP_BOOTSTRAP_LISTENER,
} from './application/application_ref';
export {PlatformRef} from './platform/platform_ref';
export {
createPlatform,
createPlatformFactory,
assertPlatform,
destroyPlatform,
getPlatform,
} from './platform/platform';
export {
provideZoneChangeDetection,
NgZoneOptions,
} from './change_detection/scheduling/ng_zone_scheduling';
export {provideExperimentalZonelessChangeDetection} from './change_detection/scheduling/zoneless_scheduling_impl';
export {PendingTasks} from './pending_tasks';
export {provideExperimentalCheckNoChangesForDebug} from './change_detection/scheduling/exhaustive_check_no_changes';
export {enableProdMode, isDevMode} from './util/is_dev_mode';
export {
APP_ID,
PACKAGE_ROOT_URL,
PLATFORM_INITIALIZER,
PLATFORM_ID,
ANIMATION_MODULE_TYPE,
CSP_NONCE,
} from './application/application_tokens';
export {APP_INITIALIZER, ApplicationInitStatus} from './application/application_init';
export * from './zone';
export * from './render';
export * from './linker';
export * from './linker/ng_module_factory_loader_impl';
export {
DebugElement,
DebugEventListener,
DebugNode,
asNativeElements,
getDebugNode,
Predicate,
} from './debug/debug_node';
export {
GetTestability,
Testability,
TestabilityRegistry,
setTestabilityGetter,
} from './testability/testability';
export * from './change_detection';
export * from './platform/platform_core_providers';
export {
TRANSLATIONS,
TRANSLATIONS_FORMAT,
LOCALE_ID,
DEFAULT_CURRENCY_CODE,
MissingTranslationStrategy,
} from './i18n/tokens';
export {ApplicationModule} from './application/application_module';
export {AbstractType, Type} from './interface/type';
export {EventEmitter} from './event_emitter';
export {ErrorHandler} from './error_handler';
export * from './core_private_export';
export * from './core_render3_private_export';
export * from './core_reactivity_export';
export {SecurityContext} from './sanitization/security';
export {Sanitizer} from './sanitization/sanitizer';
export {
createNgModule,
createNgModuleRef,
createEnvironmentInjector,
} from './render3/ng_module_ref';
export {createComponent, reflectComponentType, ComponentMirror} from './render3/component';
export {isStandalone} from './render3/definition';
export {AfterRenderPhase, AfterRenderRef} from './render3/after_render/api';
export {
AfterRenderOptions,
afterRender,
afterNextRender,
ɵFirstAvailable,
} from './render3/after_render/hooks';
export {ApplicationConfig, mergeApplicationConfig} from './application/application_config';
export {makeStateKey, StateKey, TransferState} from './transfer_state';
export {booleanAttribute, numberAttribute} from './util/coercion';
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.)',
);
};
}