1
|
/**
|
2
|
* @license
|
3
|
* Copyright Google Inc. All Rights Reserved.
|
4
|
*
|
5
|
* Use of this source code is governed by an MIT-style license that can be
|
6
|
* found in the LICENSE file at https://angular.io/license
|
7
|
*/
|
8
|
/**
|
9
|
* Defines template and style encapsulation options available for Component's {@link Component}.
|
10
|
*
|
11
|
* See {@link Component#encapsulation}.
|
12
|
* @stable
|
13
|
*/
|
14
|
export declare enum ViewEncapsulation {
|
15
|
/**
|
16
|
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
17
|
* Element and pre-processing the style rules provided via
|
18
|
* {@link Component#styles} or {@link Component#styleUrls}, and adding the new Host Element
|
19
|
* attribute to all selectors.
|
20
|
*
|
21
|
* This is the default option.
|
22
|
*/
|
23
|
Emulated = 0,
|
24
|
/**
|
25
|
* Use the native encapsulation mechanism of the renderer.
|
26
|
*
|
27
|
* For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
|
28
|
* creating a ShadowRoot for Component's Host Element.
|
29
|
*/
|
30
|
Native = 1,
|
31
|
/**
|
32
|
* Don't provide any template or style encapsulation.
|
33
|
*/
|
34
|
None = 2,
|
35
|
}
|
36
|
/**
|
37
|
* Metadata properties available for configuring Views.
|
38
|
*
|
39
|
* For details on the `@Component` annotation, see {@link Component}.
|
40
|
*
|
41
|
* ### Example
|
42
|
*
|
43
|
* ```
|
44
|
* @Component({
|
45
|
* selector: 'greet',
|
46
|
* template: 'Hello {{name}}!',
|
47
|
* })
|
48
|
* class Greet {
|
49
|
* name: string;
|
50
|
*
|
51
|
* constructor() {
|
52
|
* this.name = 'World';
|
53
|
* }
|
54
|
* }
|
55
|
* ```
|
56
|
*
|
57
|
* @deprecated Use Component instead.
|
58
|
*
|
59
|
* {@link Component}
|
60
|
*/
|
61
|
export declare class ViewMetadata {
|
62
|
/** {@link Component#templateUrl} */
|
63
|
templateUrl: string | undefined;
|
64
|
/** {@link Component#template} */
|
65
|
template: string | undefined;
|
66
|
/** {@link Component#stylesUrl} */
|
67
|
styleUrls: string[] | undefined;
|
68
|
/** {@link Component#styles} */
|
69
|
styles: string[] | undefined;
|
70
|
/** {@link Component#encapsulation} */
|
71
|
encapsulation: ViewEncapsulation | undefined;
|
72
|
/** {@link Component#animation} */
|
73
|
animations: any[] | undefined;
|
74
|
/** {@link Component#interpolation} */
|
75
|
interpolation: [string, string] | undefined;
|
76
|
constructor(opts?: {
|
77
|
templateUrl?: string;
|
78
|
template?: string;
|
79
|
encapsulation?: ViewEncapsulation;
|
80
|
styles?: string[];
|
81
|
styleUrls?: string[];
|
82
|
animations?: any[];
|
83
|
interpolation?: [string, string];
|
84
|
});
|
85
|
}
|