From a2bd50f4b864e7edf04b96e870730de11bee3bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Wei=C3=9F?= <7667003+bastiW@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:56:22 +0200 Subject: [PATCH] Fix angular event handling (#2) * wip: remove on from output variables * remove on also on emit event * wip on test * add event child props * add e2e test * Event listener e2e test * clean up * add changeset --- .changeset/six-ghosts-exercise.md | 5 +++++ packages/core/src/generators/angular/index.ts | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/six-ghosts-exercise.md diff --git a/.changeset/six-ghosts-exercise.md b/.changeset/six-ghosts-exercise.md new file mode 100644 index 0000000000..d1d7783f97 --- /dev/null +++ b/.changeset/six-ghosts-exercise.md @@ -0,0 +1,5 @@ +--- +'@builder.io/mitosis': minor +--- + +Remove on prefix on angulare event emits to be aligned with Angular Style Rule 05-16: Don't Prefix Output Properties diff --git a/packages/core/src/generators/angular/index.ts b/packages/core/src/generators/angular/index.ts index e3239fa385..7d95f85b22 100644 --- a/packages/core/src/generators/angular/index.ts +++ b/packages/core/src/generators/angular/index.ts @@ -877,8 +877,6 @@ export const componentToAngular: TranspilerGenerator = return `@Output() ${removeOnFromAngularOutputEvent(outputName)} = new EventEmitter()`; }); - outputs.forEach(console.log); - const domRefs = getRefs(json); const jsRefs = Object.keys(json.refs).filter((ref) => !domRefs.has(ref)); const componentsUsed = Array.from(getComponentsUsed(json)).filter((item) => {