There was an error while loading. Please reload this page.
1 parent 112ade8 commit 5ea6252Copy full SHA for 5ea6252
apps/signal/51-function-call-effect/src/app/action.component.ts
@@ -4,6 +4,7 @@ import {
4
effect,
5
inject,
6
signal,
7
+ untracked,
8
} from '@angular/core';
9
import { FormsModule } from '@angular/forms';
10
import { UserService } from './user.service';
@@ -38,7 +39,8 @@ export class ActionsComponent {
38
39
40
constructor() {
41
effect(() => {
- this.userService.log(this.action() ?? 'No action selected');
42
+ const action = this.action() ?? 'No action selected';
43
+ untracked(() => this.userService.log(action));
44
});
45
}
46
0 commit comments