Angular - State Management
You want to create a simple store using
BehaviorSubject to hold a user's profile object and update it safely. Which approach correctly updates only the user's name without losing other profile data?
const profile$ = new BehaviorSubject({ name: 'Alice', age: 30 });
// Update name to 'Bob' here