ITADN

Missing onActivate method in AppComponent causes TypeError on route change

#3591OpenSn0w3y 创建于 2026-02-24
S
Sn0w3ycommented
## Bug Commit 9bb924f (`[UI] implement wcag 1.4.4`) added `(activate)="onActivate($event)"` to the router-outlet in `app.component.html` and injected `LayoutRefreshService`, but the `onActivate()` method was never added to `app.component.ts`. This causes a `TypeError: r.onActivate is not a function` on every route change, and the intended chart resize via `LayoutRefreshService` never happens. ### Steps to reproduce 1. Open any page with a chart widget 2. Navigate to a different view and back 3. Check the browser console ### Expected behavior No TypeError, and `LayoutRefreshService.request()` should be called on route activation so charts recalculate their height. ### Suggested fix Add the missing method to `app.component.ts`: ```typescript public onActivate(_event: any): void { this.layoutRefresh.request(200); } ```
0 条评论