mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): move outdated comment to view.ts (#44099)
remove the comment suggesting to use a const enum for ViewEncapsulation in the renderer3/definitions.ts file and add a similar comment in the view.ts file in which the enum is defined Note: the new comment does not contain the suggestion of changing `None` to `0` as it is unclear what benefits that would bring (for more info see: https://github.com/angular/angular/pull/44099#discussion_r744157686) PR Close #44099
This commit is contained in:
parent
4809bbd83c
commit
0bd01ca64a
2 changed files with 3 additions and 2 deletions
|
|
@ -19,6 +19,9 @@
|
|||
* @publicApi
|
||||
*/
|
||||
export enum ViewEncapsulation {
|
||||
// TODO: consider making `ViewEncapsulation` a `const enum` instead. See
|
||||
// https://github.com/angular/angular/issues/44119 for additional information.
|
||||
|
||||
/**
|
||||
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
||||
* Element and pre-processing the style rules provided via {@link Component#styles styles} or
|
||||
|
|
|
|||
|
|
@ -315,8 +315,6 @@ export function ɵɵdefineComponent<T>(componentDefinition: {
|
|||
viewQuery: componentDefinition.viewQuery || null,
|
||||
features: componentDefinition.features as DirectiveDefFeature[] || null,
|
||||
data: componentDefinition.data || {},
|
||||
// TODO(misko): convert ViewEncapsulation into const enum so that it can be used
|
||||
// directly in the next line. Also `None` should be 0 not 2.
|
||||
encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,
|
||||
id: 'c',
|
||||
styles: componentDefinition.styles || EMPTY_ARRAY,
|
||||
|
|
|
|||
Loading…
Reference in a new issue