refactor(ivy): evaluate prop-based styling bindings with a new algorithm (#30469)
This is the first refactor PR designed to change how styling bindings (i.e. `[style]` and `[class]`) behave in Ivy. Instead of having a heavy element-by-element context be generated for each element, this new refactor aims to use a single context for each `tNode` element that is examined and iterated over when styling values are to be applied to the element. This patch brings this new functionality to prop-based bindings such as `[style.prop]` and `[class.name]`. PR Close #30469
This commit is contained in:

committed by
Jason Aden

parent
848e53efd0
commit
f03475cac8
@ -5,7 +5,7 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {TStylingContext} from '../styling_next/interfaces';
|
||||
import {CssSelector} from './projection';
|
||||
import {RNode} from './renderer';
|
||||
import {StylingContext} from './styling';
|
||||
@ -438,6 +438,10 @@ export interface TNode {
|
||||
* with functions each time the creation block is called.
|
||||
*/
|
||||
onElementCreationFns: Function[]|null;
|
||||
// TODO (matsko): rename this to `styles` once the old styling impl is gone
|
||||
newStyles: TStylingContext|null;
|
||||
// TODO (matsko): rename this to `classes` once the old styling impl is gone
|
||||
newClasses: TStylingContext|null;
|
||||
}
|
||||
|
||||
/** Static data for an element */
|
||||
|
Reference in New Issue
Block a user