Angular patterns — standalone components, signals, inject(), reactive forms, HTTP interceptors, and new control flow
95
94%
Does it follow best practices?
Impact
99%
2.75xAverage score across 4 eval scenarios
Passed
No known issues
Build a notification bell component in Angular. The component should:
GET /api/notifications/unread-count) every 30 seconds to get the number of unread notifications.GET /api/notifications?limit=10 and displays them as a list with title, message preview, and relative timestamp.// GET /api/notifications/unread-count
{ "data": { "count": 3 } }
// GET /api/notifications?limit=10
{
"data": [
{
"id": "n1",
"title": "New comment",
"preview": "Alice replied to your post...",
"createdAt": "2025-12-01T10:30:00Z",
"read": false
}
]
}Produce TypeScript files in a src/app/ directory:
src/app/notifications/notification.model.ts -- TypeScript type definitionssrc/app/notifications/notification.service.ts -- service handling both API callssrc/app/notifications/notification-bell.component.ts -- the bell with badge and dropdownDo not include test files or build configuration.