Theme
Research
Teaching
Resume/CV
<!DOCTYPE html> <html> <head> <style> body { background: #f0f0f0; color: #333; } </style> </head> <body> <h1>Hello Prism.js</h1> <!-- Inline scripts are not safe for SSR and should be migrated into an Angular component (e.g., handle clicks via (click) bindings or add listeners in ngAfterViewInit) --> </body> </html> import { HttpClient } from '@angular/common/http'; import { map } from 'rxjs/operators'; type Todo = { id: number; title: string; completed: boolean; }; export class TodosService { constructor(private http: HttpClient) {} getTodos() { return this.http.get<Todo[]>('/api/todos') .pipe(map(list => list.filter(t => !t.completed))); } }
Code Snippet