Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47d0668

Browse files
atscottalan-agius4
authored andcommitted
refactor(@angular/cli): Add instructions to component zoneless migration to retain NgZone.run
I observed that it chose to do this in one test. These should not be removed for libraries that support Zone applications and also should not be removed for applications until the zoneless migration is entirely complete.
1 parent 0015607 commit 47d0668

File tree

1 file changed

+1
-0
lines changed
  • packages/angular/cli/src/commands/mcp/tools/onpush-zoneless-migration

1 file changed

+1
-0
lines changed

packages/angular/cli/src/commands/mcp/tools/onpush-zoneless-migration/prompts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export function generateZonelessMigrationInstructionsForComponent(
154154
3. **DO NOT** use \`ChangeDetectionStrategy.OnPush\`. This will be the next step in the migration, but it is not part of this task.
155155
4. **DO NOT** modify properties that are already signals or are used with the \`async\` pipe in the template, as they are already zoneless-compatible.
156156
5. **DO NOT** make any changes to files other than the component file at \`${filePath}\` and its direct template/style files if necessary.
157+
6. **DO NOT** remove or modify usages of \`NgZone.run\` or \`NgZone.runOutsideAngular\`. These are still required.
157158
158159
### Final Step
159160
After you have applied all the required changes and followed all the rules, consult this tool again for the next steps in the migration process.`;

0 commit comments

Comments
 (0)