Components, DI, RxJS, change detection, forms and routing.
Simulate a writable signal holding a number and count how many times it notifies its consumers.
Write entryPoint(initial, ops):
A component keeps todos = signal<Todo[]>([]) and updates it
immutably. Simulate the updates and count notifications.
Write entryPoint(ops). Each op is one of:
What is a signal in Angular? Show how you create one, read it, and change it, and say why a template that reads it stays up to date.
What does computed() do? Using
total = computed(() => this.price() * this.qty()), explain when the
function runs and why you can't call total.set(...).
What is effect() for in Angular, and when would you use it rather
than computed()? Give one good use and one thing you should not use
it for.
A teammate writes {{ count }} in the template where count is a
signal, and in the class does this.count.set(this.count + 1). What
goes wrong in each place, and what is the correct code?