refactor(ivy): remove ɵɵelementProperty instruction (#30645)
- Removes ɵɵelementProperty instruction - Updates tests that were using it - NOTE: There is one test under `render3/integration_spec.ts` that is commented out, and needs to be reviewed. Basically, I could not find a good why to test what it was doing, because it was doing things that I am not sure we could generate in an acceptance test. PR Close #30645
This commit is contained in:
@ -108,7 +108,6 @@ export {
|
||||
ɵɵcontentQuery,
|
||||
ɵɵloadContentQuery,
|
||||
ɵɵelementEnd,
|
||||
ɵɵelementProperty,
|
||||
ɵɵproperty,
|
||||
ɵɵpropertyInterpolate,
|
||||
ɵɵpropertyInterpolate1,
|
||||
|
@ -98,8 +98,10 @@ class MyApp {
|
||||
ɵɵelementEnd();
|
||||
}
|
||||
if (rf & RenderFlags.Update) {
|
||||
ɵɵelementProperty(0, 'title', ɵɵbind(ctx.name));
|
||||
ɵɵtextBinding(1, ɵɵinterpolation1('Hello ', ctx.name, '!'));
|
||||
ɵɵselect(0);
|
||||
ɵɵproperty('title', ctx.name);
|
||||
ɵɵselect(1);
|
||||
ɵɵtextInterpolate1('Hello ', ctx.name, '!');
|
||||
}
|
||||
...
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ export {
|
||||
ɵɵelementEnd,
|
||||
|
||||
ɵɵelementHostAttrs,
|
||||
ɵɵelementProperty,
|
||||
ɵɵelementStart,
|
||||
ɵɵembeddedViewEnd,
|
||||
|
||||
|
@ -61,32 +61,6 @@ export function ɵɵbind<T>(value: T): T|NO_CHANGE {
|
||||
return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;
|
||||
}
|
||||
|
||||
/**
|
||||
* **TODO: Remove this function after `property` is in use**
|
||||
* Update a property on an element.
|
||||
*
|
||||
* If the property name also exists as an input property on one of the element's directives,
|
||||
* the component property will be set instead of the element property. This check must
|
||||
* be conducted at runtime so child components that add new @Inputs don't have to be re-compiled.
|
||||
*
|
||||
* @param index The index of the element to update in the data array
|
||||
* @param propName Name of property. Because it is going to DOM, this is not subject to
|
||||
* renaming as part of minification.
|
||||
* @param value New value to write.
|
||||
* @param sanitizer An optional function used to sanitize the value.
|
||||
* @param nativeOnly Whether or not we should only set native properties and skip input check
|
||||
* (this is necessary for host property bindings)
|
||||
*
|
||||
* @codeGenApi
|
||||
*/
|
||||
export function ɵɵelementProperty<T>(
|
||||
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
|
||||
nativeOnly?: boolean): void {
|
||||
if (value !== NO_CHANGE) {
|
||||
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a synthetic host binding (e.g. `[@foo]`) on a component.
|
||||
*
|
||||
|
@ -87,7 +87,6 @@ export const angularCoreEnv: {[name: string]: Function} =
|
||||
'ɵɵlistener': r3.ɵɵlistener,
|
||||
'ɵɵload': r3.ɵɵload,
|
||||
'ɵɵprojection': r3.ɵɵprojection,
|
||||
'ɵɵelementProperty': r3.ɵɵelementProperty,
|
||||
'ɵɵupdateSyntheticHostBinding': r3.ɵɵupdateSyntheticHostBinding,
|
||||
'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener,
|
||||
'ɵɵpipeBind1': r3.ɵɵpipeBind1,
|
||||
|
Reference in New Issue
Block a user