fix(animations): properly cache renderer and namespace triggers (#14703)
- Don’t use the animation renderer if a component used style encapsulation but no animations. - The `AnimationRenderer` should be cached in the same lifecycle as its delegate. - Trigger names need to be namespaced per component type.
This commit is contained in:
@ -82,7 +82,7 @@ export function main() {
|
||||
expect(engine.captures['setProperty']).toBeFalsy();
|
||||
|
||||
renderer.setProperty(element, '@prop', 'value');
|
||||
expect(engine.captures['setProperty'].pop()).toEqual([element, 'prop', 'value']);
|
||||
expect(engine.captures['setProperty'].pop()).toEqual([element, 'id#prop', 'value']);
|
||||
});
|
||||
|
||||
describe('listen', () => {
|
||||
@ -96,7 +96,7 @@ export function main() {
|
||||
expect(engine.captures['listen']).toBeFalsy();
|
||||
|
||||
renderer.listen(element, '@event.phase', cb);
|
||||
expect(engine.captures['listen'].pop()).toEqual([element, 'event', 'phase']);
|
||||
expect(engine.captures['listen'].pop()).toEqual([element, 'id#event', 'phase']);
|
||||
});
|
||||
|
||||
it('should resolve the body|document|window nodes given their values as strings as input',
|
||||
|
Reference in New Issue
Block a user