count is 0. What renders?
@if (count) { <p>A</p>} @else { <p>B</p>}What this Angular test measures, in short
This test checks whether you understand how modern Angular behaves: template control flow and bindings, how signals and computed values update, how dependency injection scopes services, how RxJS observables run, and when change detection and lifecycle hooks fire.
Questions assume Angular 17 or later with standalone components. AngularJS (1.x) isn't covered. The questions are our own and not standardised, so treat the result as a knowledge check, not a certification.
By What's Your IQ · Reviewed 4 Oct 2026- Format
- 15 questions on what renders or logs, 4 options each
- Topics
- Templates, signals, dependency injection, RxJS, change detection and lifecycle
- Assumes
- Comfortable TypeScript
- Framework
- Maintained by Google; Angular 2+ since 2016
Only what depends on it re-runs
A computed signal remembers which signals it read and recalculates only when one of them changes. Change each source and watch the run counters.
count = signal(1);price = signal(10);double = computed(() => count() * 2);total = computed(() => count() * price());effect(() => console.log(double()));
Still works, but there's a better way now
user?: User;private sub?: Subscription;ngOnInit() { this.sub = this.api.user$.subscribe(u => this.user = u);}ngOnDestroy() { this.sub?.unsubscribe();}user = toSignal(this.api.user$);// template: {{ user()?.name }}Manual subscriptions leak if you forget to unsubscribe. toSignal (or the async pipe) subscribes and cleans up with the component.
- Google. AngularJS and Angular history. angular.dev and angularjs.org.
- Angular Team. Angular v16, v17 and v18 release posts. Angular Blog.