-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compiler): implement style encapsulation for new view engine #14518
Conversation
9e0fe31
to
902df2a
Compare
styles: (string|any[])[]; | ||
data: {[kind: string]: any[]}; | ||
} | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* in which case the view engine won't call it. | ||
* This is used as a performance optimization for production mode. | ||
*/ | ||
abstract destroyNode(node: any): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to destroyNode: (node: an) => void | null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -12,7 +12,7 @@ export {directiveDef, pipeDef, providerDef} from './provider'; | |||
export {pureArrayDef, pureObjectDef, purePipeDef} from './pure_expression'; | |||
export {queryDef} from './query'; | |||
export {createComponentFactory} from './refs'; | |||
export {initServicesIfNeeded} from './services'; | |||
export {getCurrentDebugContext, initServicesIfNeeded} from './services'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -26,10 +28,20 @@ const InjectorRefTokenKey = tokenKey(Injector); | |||
|
|||
const NOT_CREATED = new Object(); | |||
|
|||
let _renderCompCount = 0; | |||
|
|||
function nextRenderCompId() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong, id has to be passed to the directiveDef
already!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
function normalizeDebugBindingValue(value: any): string { | ||
try { | ||
// Limit the size of the value as otherwise the DOM just gets polluted. | ||
return value ? value.toString().slice(0, 10) : value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe set to 20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -42,8 +42,9 @@ export function _createConditionalRootRenderer(rootRenderer: any) { | |||
return isDevMode() ? new DebugDomRootRenderer(rootRenderer) : rootRenderer; | |||
} | |||
|
|||
export function _createDebugRendererV2(renderer: RendererV2): RendererV2 { | |||
return isDevMode() ? new DebugDomRendererV2(renderer) : renderer; | |||
export function _createDebugRendererV2( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
902df2a
to
be44de1
Compare
be44de1
to
2551e35
Compare
Included refactoring: - splits the `RendererV2` into a `RendererFactoryV2` and a `RendererV2` - makes the `DebugRendererV2` a private class in `@angular/core` - remove `setBindingDebugInfo` from `RendererV2`, but rename `RendererV2.setText` to `RendererV2.setValue` and allow it on comments and text nodes. Part of angular#14013
2551e35
to
e8e39ba
Compare
…gular#14518) Included refactoring: - splits the `RendererV2` into a `RendererFactoryV2` and a `RendererV2` - makes the `DebugRendererV2` a private class in `@angular/core` - remove `setBindingDebugInfo` from `RendererV2`, but rename `RendererV2.setText` to `RendererV2.setValue` and allow it on comments and text nodes. Part of angular#14013
…gular#14518) Included refactoring: - splits the `RendererV2` into a `RendererFactoryV2` and a `RendererV2` - makes the `DebugRendererV2` a private class in `@angular/core` - remove `setBindingDebugInfo` from `RendererV2`, but rename `RendererV2.setText` to `RendererV2.setValue` and allow it on comments and text nodes. Part of angular#14013
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.