Grilled Cheese

ExploreLog inSign up
Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST

PhotosVideosAllPeople
LatestRanked
Photo, no description
Photo, no description
Angular code in breadcrumbs.ts. First, const orderTitle: ResolveFn<string> = ({ params }) => `Order ${params['id']}`. Then export const routes: Routes with a route path 'orders', title 'Orders', and children: a route path ':id' with title: orderTitle and component: OrderDetails. Then a component with selector 'app-breadcrumbs' whose template is @for (crumb of breadcrumbs(); track $index) { <span>{{ crumb }}</span> }. In class Breadcrumbs: private readonly router = inject(Router); and readonly breadcrumbs = computed(() => { ... }). Inside the computed: this.router.currentNavigation(); with the comment "re-run when a navigation starts or ends", then const crumbs: string[] = []; let route = this.router.routerState.snapshot.root.firstChild; while (route) { if (route.title) crumbs.push(route.title); route = route.firstChild; } and return crumbs. The title: 'Orders' line, the currentNavigation line and the route.title line are highlighted.
Angular code in app.config.ts. @Injectable({ providedIn: 'root' }) export class FlaggedPreloading implements PreloadingStrategy, with the method preload(route: Route, load: () => Observable<unknown>) that returns route.data?.['preload'] ? load() : of(null). Then export const routes: Routes with two routes: path 'dashboard' with loadComponent: () => import('./dashboard') and data: { preload: true }, and path 'admin' with loadComponent: () => import('./admin') and no data. Last, export const appConfig: ApplicationConfig = { providers: [provideRouter(routes, withPreloading(FlaggedPreloading))] }. The return line, the data: { preload: true } line and the providers line are highlighted.
Trinta – Angular 22 Material Design Admin Dashboard Template + SSR
Angular code in export.ts. A component with selector 'app-export' and the template: <button (click)="start$.next()">Export report</button>, then @let job = exportJob(); @if (job?.status === 'running') shows <progress [value]="job.progress" max="100">, @else if (job?.status === 'done') shows <a [href]="job.fileUrl">Download report</a>. In class Export: private readonly http = inject(HttpClient); readonly start$ = new Subject<void>(); readonly exportJob = toSignal(this.start$.pipe(switchMap(() => this.http.post<{ id: string }>('/api/exports', {})), switchMap(({ id }) => timer(0, 2000).pipe(switchMap(() => this.http.get<ExportJob>(`/api/exports/${id}`)), takeWhile((job) => job.status === 'running', true))))). The takeWhile line is highlighted.
Steex – Angular 21 Admin  Dashboard Template
elastic ui – Angular 16+ Material Design  Redux Admin Template
Angular code in chat.ts. A component with selector 'app-chat' and the template: a div with class "messages" and the reference #list, holding @for (message of messages(); track message.id) { <p [class]="message.role">{{ message.content }}</p> }, then <input #prompt (keydown.enter)="send(prompt.value); prompt.value = ''" />. In class Chat: private readonly agent = new HttpAgent({ url: '/api/agent' }); private readonly list = viewChild.required<ElementRef<HTMLElement>>('list'); readonly messages = signal<Message[]>([]). The constructor calls this.agent.subscribe({ onMessagesChanged: ({ messages }) => this.messages.set([...messages]) }), then afterRenderEffect(() => { this.messages(); const element = this.list().nativeElement; element.scrollTop = element.scrollHeight; }). The method send(content: string) calls this.agent.addMessage({ id: crypto.randomUUID(), role: 'user', content }) and this.agent.runAgent(). The afterRenderEffect line and the scrollTop line are highlighted.
Angular code in signup.ts, in three parts. "Reactive Forms": readonly signupForm = new FormGroup({ isBusiness: new FormControl(false), company: new FormControl('') }); then a constructor that subscribes to this.signupForm.controls.isBusiness.valueChanges.pipe(takeUntilDestroyed()) and, for each value, takes const company = this.signupForm.controls.company, calls company.setValidators(isBusiness ? Validators.required : null) and company.updateValueAndValidity(). "Signal Forms": readonly model = signal({ isBusiness: false, company: '' }); readonly signupForm = form(this.model, (path) => { hidden(path.company, { when: ({ valueOf }) => !valueOf(path.isBusiness) }); required(path.company); }). "Template": @if (!signupForm.company().hidden()) { <input [formField]="signupForm.company" /> }. The hidden and required lines are highlighted.
Angular code in editor.ts. A component with selector 'app-editor', imports: [DatePipe], and host: { '(document:keydown.control.s)': 'save($event)', '(document:keydown.meta.s)': 'save($event)' }. The template: <textarea #area [value]="draft()" (input)="draft.set(area.value)"></textarea>, then @if (savedAt(); as time) { <small>Saved at {{ time | date: 'shortTime' }}</small> }. In class Editor: readonly draft = signal(localStorage.getItem('draft') ?? ''); readonly savedAt = signal<Date | null>(null). The method save(event: Event) calls event.preventDefault(), localStorage.setItem('draft', this.draft()) and this.savedAt.set(new Date()). The two host listener lines are highlighted.
Photo, no description
Angular code in app.ts. const ACTIVE_EVENTS = ['click', 'scroll', 'keydown', 'mousemove']. A component with selector 'app-root' and the template: @if (isInactive()) { <p class="notice">You have been inactive for a while 👀</p> }. In class App: readonly isInactive = toSignal(merge(...ACTIVE_EVENTS.map((event) => fromEvent(document, event))).pipe(startWith(null), switchMap(() => timer(10_000).pipe(map(() => true), startWith(false)))), { initialValue: false }). The merge line and the switchMap line are highlighted.
Angular code in page-size.ts. export const PAGE_SIZE = new InjectionToken<number>('PAGE_SIZE', { factory: () => 20 }), with the factory line highlighted. A component with selector 'app-list' and template `Page size: {{ pageSize }}`; its class List has readonly pageSize = inject(PAGE_SIZE), with the comment "20, no providers needed". A second component with selector 'app-admin' imports List and has providers: [{ provide: PAGE_SIZE, useValue: 100 }] (highlighted), with template `<app-list />` and the comment "shows 100". Its class is Admin.
Angular code in report.service.ts. An @Injectable({ providedIn: 'root' }) class ReportService with private readonly http = inject(HttpClient). Its getReport() method returns this.http.get<Report>('/api/report').pipe(retry({ ... })). The retry config (highlighted) has count: 3, with the comment "give up after 3 retries", and delay: (error: HttpErrorResponse, attempt) => { ... }. Inside, with the comment "a 404 won't fix itself, fail right away": if (error.status < 500) { return throwError(() => error); }. Then return timer(2 ** attempt * 1000), with the comment "wait 2s, 4s, 8s" (highlighted).
Angular code. In settings.ts: @Component({ selector: 'app-settings', template: `...` }) followed by export default class Settings {} (highlighted). In app.routes.ts: export const routes: Routes = [ { path: 'settings', loadComponent: () => import('./settings') } (highlighted), { path: 'profile', loadComponent: () => import('./profile').then((m) => m.Profile) } ].
Unice – Multipurpose Angular 21 Template for SaaS, Startup  Agency
"Hands on: NgRx Toolkit! Supercharging SignalStore", November 4, 4:30 PM UTC. Host Armen Vardanyan on a purple space background, with the Angular Space TV and Angular logos.
Photo, no description
Angular code in tabs.ts. A component with selector 'app-tabs'. Its template loops with @for (tab of tabs(); track tab) and renders a button for each tab: (click)="active.set(tab)" with the text {{ tab.label() }}. After the loop is <ng-content />. The class Tabs has readonly tabs = contentChildren(Tab) (highlighted) and readonly active = linkedSignal(() => this.tabs()[0]). A comment shows the usage: <app-tabs> containing <app-tab label="Profile">...</app-tab> and <app-tab label="Settings">...</app-tab>.
Load more