-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Error in stackblitz for Dynamic component loader #48047
Copy link
Copy link
Closed as not planned
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtime
Milestone
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtime