@angular/core 6.0.6 → 6.0.7
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/bundles/core-testing.umd.js +1 -1
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +126 -23
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +2 -2
- package/bundles/core.umd.min.js.map +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/src/metadata/directives.js +114 -17
- package/esm2015/src/metadata/ng_module.js +19 -11
- package/esm2015/src/version.js +1 -1
- package/esm5/src/metadata/directives.js +112 -14
- package/esm5/src/metadata/ng_module.js +14 -9
- package/esm5/src/version.js +1 -1
- package/fesm2015/core.js +133 -28
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm5/core.js +126 -23
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/package.json +1 -1
- package/src/metadata/directives.d.ts +382 -397
- package/src/metadata/ng_module.d.ts +49 -38
|
@@ -2,7 +2,7 @@ import { Provider } from '../di/provider';
|
|
|
2
2
|
import { Type } from '../type';
|
|
3
3
|
import { TypeDecorator } from '../util/decorators';
|
|
4
4
|
/**
|
|
5
|
-
* A wrapper around
|
|
5
|
+
* A wrapper around an NgModule that associates it with the providers.
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
@@ -11,7 +11,11 @@ export interface ModuleWithProviders {
|
|
|
11
11
|
providers?: Provider[];
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* A schema definition associated with an NgModule.
|
|
15
|
+
*
|
|
16
|
+
* @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
|
|
17
|
+
*
|
|
18
|
+
* @param name The name of a defined schema.
|
|
15
19
|
*
|
|
16
20
|
* @experimental
|
|
17
21
|
*/
|
|
@@ -19,16 +23,16 @@ export interface SchemaMetadata {
|
|
|
19
23
|
name: string;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
|
-
* Defines a schema that
|
|
23
|
-
* -
|
|
24
|
-
* -
|
|
25
|
-
* elements.
|
|
26
|
+
* Defines a schema that allows an NgModule to contain the following:
|
|
27
|
+
* - Non-Angular elements named with dash case (`-`).
|
|
28
|
+
* - Element properties named with dash case (`-`).
|
|
29
|
+
* Dash case is the naming convention for custom elements.
|
|
26
30
|
*
|
|
27
31
|
*
|
|
28
32
|
*/
|
|
29
33
|
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
|
30
34
|
/**
|
|
31
|
-
* Defines a schema that
|
|
35
|
+
* Defines a schema that allows any property on any element.
|
|
32
36
|
*
|
|
33
37
|
* @experimental
|
|
34
38
|
*/
|
|
@@ -40,7 +44,7 @@ export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
|
|
40
44
|
*/
|
|
41
45
|
export interface NgModuleDecorator {
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* Marks a class as an NgModule and supplies configuration metadata.
|
|
44
48
|
*/
|
|
45
49
|
(obj?: NgModule): TypeDecorator;
|
|
46
50
|
new (obj?: NgModule): NgModule;
|
|
@@ -52,12 +56,13 @@ export interface NgModuleDecorator {
|
|
|
52
56
|
*/
|
|
53
57
|
export interface NgModule {
|
|
54
58
|
/**
|
|
55
|
-
*
|
|
59
|
+
* The set of injectable objects that are available in the injector
|
|
56
60
|
* of this module.
|
|
57
61
|
*
|
|
58
|
-
*
|
|
62
|
+
* @usageNotes
|
|
59
63
|
*
|
|
60
|
-
*
|
|
64
|
+
* The following example defines a class that is injected in
|
|
65
|
+
* the HelloWorld NgModule:
|
|
61
66
|
*
|
|
62
67
|
* ```
|
|
63
68
|
* class Greeter {
|
|
@@ -82,9 +87,12 @@ export interface NgModule {
|
|
|
82
87
|
*/
|
|
83
88
|
providers?: Provider[];
|
|
84
89
|
/**
|
|
85
|
-
*
|
|
90
|
+
* The set of directives and pipes that belong to this module.
|
|
91
|
+
*
|
|
92
|
+
* @usageNotes
|
|
86
93
|
*
|
|
87
|
-
*
|
|
94
|
+
* The following example allows the CommonModule to use the `NgFor`
|
|
95
|
+
* directive.
|
|
88
96
|
*
|
|
89
97
|
* ```javascript
|
|
90
98
|
* @NgModule({
|
|
@@ -96,11 +104,13 @@ export interface NgModule {
|
|
|
96
104
|
*/
|
|
97
105
|
declarations?: Array<Type<any> | any[]>;
|
|
98
106
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
107
|
+
* The set of NgModules, with or without providers,
|
|
108
|
+
* whose exported directives/pipes
|
|
109
|
+
* are available to templates in this module.
|
|
102
110
|
*
|
|
103
|
-
*
|
|
111
|
+
* @usageNotes
|
|
112
|
+
*
|
|
113
|
+
* The following example allows MainModule to use CommonModule:
|
|
104
114
|
*
|
|
105
115
|
* ```javascript
|
|
106
116
|
* @NgModule({
|
|
@@ -109,14 +119,17 @@ export interface NgModule {
|
|
|
109
119
|
* class MainModule {
|
|
110
120
|
* }
|
|
111
121
|
* ```
|
|
122
|
+
* @see {@link ModuleWithProviders}
|
|
112
123
|
*/
|
|
113
124
|
imports?: Array<Type<any> | ModuleWithProviders | any[]>;
|
|
114
125
|
/**
|
|
115
|
-
*
|
|
116
|
-
* of any component that is part of an
|
|
117
|
-
* that imports this
|
|
126
|
+
* The set of directives, pipe, and NgModules that can be used
|
|
127
|
+
* within the template of any component that is part of an
|
|
128
|
+
* NgModule that imports this NgModule.
|
|
129
|
+
*
|
|
130
|
+
* @usageNotes
|
|
118
131
|
*
|
|
119
|
-
*
|
|
132
|
+
* The following example exports the `NgFor` directive from CommonModule.
|
|
120
133
|
*
|
|
121
134
|
* ```javascript
|
|
122
135
|
* @NgModule({
|
|
@@ -128,40 +141,38 @@ export interface NgModule {
|
|
|
128
141
|
*/
|
|
129
142
|
exports?: Array<Type<any> | any[]>;
|
|
130
143
|
/**
|
|
131
|
-
*
|
|
132
|
-
* For each component listed here, Angular
|
|
133
|
-
* and
|
|
144
|
+
* The set of components to compile when this NgModule is defined.
|
|
145
|
+
* For each component listed here, Angular creates a `ComponentFactory`
|
|
146
|
+
* and stores it in the `ComponentFactoryResolver`.
|
|
134
147
|
*/
|
|
135
148
|
entryComponents?: Array<Type<any> | any[]>;
|
|
136
149
|
/**
|
|
137
|
-
*
|
|
150
|
+
* The set of components that are bootstrapped when
|
|
138
151
|
* this module is bootstrapped. The components listed here
|
|
139
|
-
*
|
|
152
|
+
* are automatically added to `entryComponents`.
|
|
140
153
|
*/
|
|
141
154
|
bootstrap?: Array<Type<any> | any[]>;
|
|
142
155
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
156
|
+
* The set of schemas that declare elements to be allowed in the NgModule.
|
|
157
|
+
* Elements and properties that are neither Angular components nor directives
|
|
158
|
+
* must be declared in a schema.
|
|
145
159
|
*
|
|
146
|
-
*
|
|
147
|
-
* - `NO_ERRORS_SCHEMA`: any elements and properties are allowed,
|
|
148
|
-
* - `CUSTOM_ELEMENTS_SCHEMA`: any custom elements (tag name has "-") with any properties are
|
|
149
|
-
* allowed.
|
|
160
|
+
* Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
|
|
150
161
|
*
|
|
151
|
-
* @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
|
|
152
|
-
* allowed elements
|
|
162
|
+
* @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
|
|
163
|
+
* you must ensure that allowed elements and properties securely escape inputs.
|
|
153
164
|
*/
|
|
154
165
|
schemas?: Array<SchemaMetadata | any[]>;
|
|
155
166
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
167
|
+
* A name or path that uniquely identifies this NgModule in `getModuleFactory`.
|
|
168
|
+
* If left `undefined`, the NgModule is not registered with
|
|
158
169
|
* `getModuleFactory`.
|
|
159
170
|
*/
|
|
160
171
|
id?: string;
|
|
161
172
|
}
|
|
162
173
|
/**
|
|
163
|
-
* NgModule
|
|
164
|
-
*
|
|
174
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
175
|
+
* configuration metadata for it.
|
|
165
176
|
*
|
|
166
177
|
* @Annotation
|
|
167
178
|
*/
|