diff --git a/.changeset/perfect-seas-bow.md b/.changeset/perfect-seas-bow.md new file mode 100644 index 0000000000..2da15ed99b --- /dev/null +++ b/.changeset/perfect-seas-bow.md @@ -0,0 +1,5 @@ +--- +'@builder.io/mitosis': patch +--- + +Angular: Fix: `useObjectWrapper` logic to correctly handle spread and objects as arguments diff --git a/packages/core/src/__tests__/__snapshots__/angular.import.test.ts.snap b/packages/core/src/__tests__/__snapshots__/angular.import.test.ts.snap index 8663b0f8a4..7535542a35 100644 --- a/packages/core/src/__tests__/__snapshots__/angular.import.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/angular.import.test.ts.snap @@ -1582,7 +1582,10 @@ import { Builder } from \\"@builder.io/sdk\\"; selector: \\"img-component, ImgComponent\\", template: \` @@ -1601,14 +1604,6 @@ export default class ImgComponent { @Input() attributes; @Input() imgSrc; @Input() altText; - - useObjectWrapper(...args) { - let obj = {}; - args.forEach((arg) => { - obj = { ...obj, ...arg }; - }); - return obj; - } } @NgModule({ @@ -1795,7 +1790,11 @@ import { Component, Input } from \\"@angular/core\\"; template: \` -
+
@@ -1814,14 +1813,6 @@ export default class SectionStateComponent { max = 42; items = [42]; - - useObjectWrapper(...args) { - let obj = {}; - args.forEach((arg) => { - obj = { ...obj, ...arg }; - }); - return obj; - } } @NgModule({ @@ -2262,7 +2253,13 @@ import { Component, Input } from \\"@angular/core\\"; template: \`