@angular/core 14.0.0-rc.1 → 14.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/di/interface/defs.mjs +1 -1
- package/esm2020/src/metadata/directives.mjs +1 -1
- package/esm2020/src/render3/features/standalone_feature.mjs +2 -2
- package/esm2020/src/render3/instructions/element.mjs +14 -7
- package/esm2020/src/render3/instructions/shared.mjs +31 -5
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/jit/module.mjs +9 -2
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/r3_test_bed_compiler.mjs +62 -20
- package/fesm2015/core.mjs +51 -12
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +24645 -38
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +51 -12
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +24644 -38
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +47 -14
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-rc.
|
|
2
|
+
* @license Angular v14.0.0-rc.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2315,21 +2315,53 @@ export declare interface DirectiveDecorator {
|
|
|
2315
2315
|
*
|
|
2316
2316
|
* ### Declaring directives
|
|
2317
2317
|
*
|
|
2318
|
-
*
|
|
2319
|
-
*
|
|
2320
|
-
*
|
|
2318
|
+
* In order to make a directive available to other components in your application, you should do
|
|
2319
|
+
* one of the following:
|
|
2320
|
+
* - either mark the directive as [standalone](guide/standalone-components),
|
|
2321
|
+
* - or declare it in an NgModule by adding it to the `declarations` and `exports` fields.
|
|
2321
2322
|
*
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
2323
|
+
* ** Marking a directive as standalone **
|
|
2324
|
+
*
|
|
2325
|
+
* You can add the `standalone: true` flag to the Directive decorator metadata to declare it as
|
|
2326
|
+
* [standalone](guide/standalone-components):
|
|
2325
2327
|
*
|
|
2326
2328
|
* ```ts
|
|
2327
|
-
*
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2330
|
-
*
|
|
2329
|
+
* @Directive({
|
|
2330
|
+
* standalone: true,
|
|
2331
|
+
* selector: 'my-directive',
|
|
2332
|
+
* })
|
|
2333
|
+
* class MyDirective {}
|
|
2331
2334
|
* ```
|
|
2332
2335
|
*
|
|
2336
|
+
* When marking a directive as standalone, please make sure that the directive is not already
|
|
2337
|
+
* declared in an NgModule.
|
|
2338
|
+
*
|
|
2339
|
+
*
|
|
2340
|
+
* ** Declaring a directive in an NgModule **
|
|
2341
|
+
*
|
|
2342
|
+
* Another approach is to declare a directive in an NgModule:
|
|
2343
|
+
*
|
|
2344
|
+
* ```ts
|
|
2345
|
+
* @Directive({
|
|
2346
|
+
* selector: 'my-directive',
|
|
2347
|
+
* })
|
|
2348
|
+
* class MyDirective {}
|
|
2349
|
+
*
|
|
2350
|
+
* @NgModule({
|
|
2351
|
+
* declarations: [MyDirective, SomeComponent],
|
|
2352
|
+
* exports: [MyDirective], // making it available outside of this module
|
|
2353
|
+
* })
|
|
2354
|
+
* class SomeNgModule {}
|
|
2355
|
+
* ```
|
|
2356
|
+
*
|
|
2357
|
+
* When declaring a directive in an NgModule, please make sure that:
|
|
2358
|
+
* - the directive is declared in exactly one NgModule.
|
|
2359
|
+
* - the directive is not standalone.
|
|
2360
|
+
* - you do not re-declare a directive imported from another module.
|
|
2361
|
+
* - the directive is included into the `exports` field as well if you want this directive to be
|
|
2362
|
+
* accessible for components outside of the NgModule.
|
|
2363
|
+
*
|
|
2364
|
+
*
|
|
2333
2365
|
* @Annotation
|
|
2334
2366
|
*/
|
|
2335
2367
|
(obj?: Directive): TypeDecorator;
|
|
@@ -3611,7 +3643,7 @@ export declare type InjectableProvider = ValueSansProvider | ExistingSansProvide
|
|
|
3611
3643
|
* A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
|
|
3612
3644
|
*
|
|
3613
3645
|
* `InjectableType`s contain their own Dependency Injection metadata and are usable in an
|
|
3614
|
-
* `InjectorDef`-based `StaticInjector
|
|
3646
|
+
* `InjectorDef`-based `StaticInjector`.
|
|
3615
3647
|
*
|
|
3616
3648
|
* @publicApi
|
|
3617
3649
|
*/
|
|
@@ -9693,7 +9725,8 @@ export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
|
|
|
9693
9725
|
*/
|
|
9694
9726
|
tView: TView | null;
|
|
9695
9727
|
/**
|
|
9696
|
-
* A function added by the {@
|
|
9728
|
+
* A function added by the {@link ɵɵStandaloneFeature} and used by the framework to create
|
|
9729
|
+
* standalone injectors.
|
|
9697
9730
|
*/
|
|
9698
9731
|
getStandaloneInjector: ((parentInjector: EnvironmentInjector) => EnvironmentInjector | null) | null;
|
|
9699
9732
|
/**
|
|
@@ -13777,7 +13810,7 @@ export declare function ɵɵsetNgModuleScope(type: any, scope: {
|
|
|
13777
13810
|
}): unknown;
|
|
13778
13811
|
|
|
13779
13812
|
/**
|
|
13780
|
-
* A feature that acts as a setup code for the {@
|
|
13813
|
+
* A feature that acts as a setup code for the {@link StandaloneService}.
|
|
13781
13814
|
*
|
|
13782
13815
|
* The most important responsaibility of this feature is to expose the "getStandaloneInjector"
|
|
13783
13816
|
* function (an entry points to a standalone injector creation) on a component definition object. We
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED