Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in stackblitz for Dynamic component loader #48047

Closed
bastienmoulia opened this issue Nov 14, 2022 · 5 comments
Closed

Error in stackblitz for Dynamic component loader #48047

bastienmoulia opened this issue Nov 14, 2022 · 5 comments
Labels
area: core Issues related to the framework runtime P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone

Comments

@bastienmoulia
Copy link

Describe the problem that you experienced

When opening the stackblitz exemple for Dynamic component loader there is a TS error.

Error: src/app/ad-banner.component.ts:45:5 - error TS2322: Type 'Timer' is not assignable to type 'number'.

45     this.interval = setInterval(() => {
       ~~~~~~~~~~~~~

Because setInterval is from NodeJS and not window.

Enter the URL of the topic with the problem

https://angular.io/generated/live-examples/dynamic-component-loader/stackblitz.html

Describe what you were looking for in the documentation

Opening the page https://angular.io/guide/dynamic-component-loader

Describe the actions that led you to experience the problem

Clicking the link live exemple

Describe what you want to experience that would fix the problem

this.interval = window.setInterval(() => {
  this.loadComponent();
}, 3000);

Add a screenshot if that helps illustrate the problem

No response

If this problem caused an exception or error, please paste it here

No response

If the problem is browser-specific, please specify the device, OS, browser, and version

No response

Provide any additional information here in as much as detail as you can

No response

@JoostK
Copy link
Member

JoostK commented Nov 14, 2022

This broke due to ReactiveX/rxjs@fce9aa1 in rxjs 7.5.6, which is causing Node types to be pulled into application compilations.

@alan-agius4
Copy link
Contributor

This only effects the IDE, it does not effect the outcome of the build of the application.

@jessicajaniuk jessicajaniuk added the area: core Issues related to the framework runtime label Nov 14, 2022
@ngbot ngbot bot added this to the needsTriage milestone Nov 14, 2022
@alxhub alxhub added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Nov 16, 2022
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Nov 16, 2022
@JeanMeche
Copy link
Member

I believe this has been fixed by ReactiveX/rxjs@c1a07b7 and shipped in RxJS 7.6 !

@JeanMeche
Copy link
Member

The issue can be closed, RxJS has been updated and the examples.

@JoostK JoostK closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to the framework runtime P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants