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
Illustration for: OpenDots is a template for agents with their own computers, where write tools wait for your approval
TypeScript code in cart.store.ts comparing two versions of the same Angular service. 'Before': @Injectable({ providedIn: 'root' }) on export class CartStore, which injects HttpClient with inject(). 'Now (Angular 22+)': the same class with the decorator @Service() instead, highlighted.
Photo, no description
Photo, no description
An Angular component in panel.ts. Line 9, highlighted, is viewProviders: [PanelState]. Template comments note that the panel's own app-panel-toggle gets PanelState, while content projected through ng-content cannot inject it (NG0201):

@Injectable()
export class PanelState {
  readonly expanded = signal(false);
}

@Component({
  selector: 'app-panel',
  imports: [PanelToggle],
  viewProviders: [PanelState],
  template: `
    <!-- The panel's own view: gets PanelState -->
    <app-panel-toggle />

    <!-- Content projected here cannot inject it (NG0201) -->
    <ng-content />
  `,
})
export class Panel {}

// <app-panel>
//   <app-panel-toggle />  <- projected content
// </app-panel>
//
// providers:     both toggles share the same PanelState
// viewProviders: only the panel's own toggle can inject it
TypeScript code in product-list.ts. A directive with selector 'ng-template[row]', class RowTemplate<T>, has a required input row of type T[] and injects TemplateRef. Its static method ngTemplateContextGuard<T>(dir: RowTemplate<T>, ctx: unknown) returns ctx is { $implicit: T; index: number } and its body is return true; this part is highlighted. Below, a ProductList component imports Table and RowTemplate and has a required input products of type Product[]. Its template is an app-table with [items]="products()", containing <ng-template [row]="products()" let-product let-i="index">, with a highlighted comment "product: Product, i: number", then {{ i + 1 }}. {{ product.name }}: {{ product.price }}.
e-Fatura React Playground in the browser: on the left, the invoice JSON request (type FTE, emitter and receiver with Cabo Verde tax IDs); on the right, Generate XML, Download ZIP, Check readiness and Open DFA PDF buttons above the generated DFE XML output (6805 bytes), with an "XML generated." notice.
An Angular component in quantity.ts, a quantity stepper. Lines 4 and 6, highlighted, use quantity-- and quantity++ directly in (click) event bindings:

@Component({
  selector: 'app-quantity',
  template: `
    <button (click)="quantity--" [disabled]="quantity === 1">-</button>
    <span>{{ quantity }}</span>
    <button (click)="quantity++">+</button>
  `,
})
export class Quantity {
  quantity = 1; // a plain field: `++` on a signal is a type error
}
TypeScript code in books-api.ts: an Angular service whose book(id) method returns TanStack Query's queryOptions, with the queryOptions line highlighted:

@Injectable({ providedIn: 'root' })
export class BooksApi {
  private readonly http = inject(HttpClient);

  book(id: number) {
    return queryOptions({
      queryKey: ['book', id],
      queryFn: () => lastValueFrom(this.http.get<Book>(`/api/books/${id}`)),
      staleTime: 30_000,
    });
  }
}
Minia – React Admin  Dashboard Template
Ciscryp – NFT Marketplace NextJs React Template
Photo, no description
Hands on: TanStack Query! How TanStack can replace resources in your Angular App. October 28, 4:30 PM UTC. Angular Space TV livestream with Armen Vardanyan, on X, YouTube, Twitch and LinkedIn.
Photo, no description
Day 021: Practice — typed event emitter
Akira UI docs page for the Button component with the default purple theme: a Growth plan card with a purple Upgrade plan button and a Compare plans button, purple accents in the sidebar and the page outline.
TypeScript code in audit-map.ts, a custom RxJS operator built from throttle and concatMap; the throttle line is highlighted:

import { concatMap, defer, finalize, from, Subject, throttle } from 'rxjs';
import type { ObservableInput, OperatorFunction } from 'rxjs';

export function auditMap<T, R>(
  project: (value: T) => ObservableInput<R>,
): OperatorFunction<T, R> {
  return (source) =>
    defer(() => {
      const done = new Subject<void>();

      return source.pipe(
        // first value goes through, then only the latest until `done`
        throttle(() => done, { leading: true, trailing: true }),
        concatMap((value) =>
          from(project(value)).pipe(finalize(() => done.next())),
        ),
      );
    });
}
Photo, no description
Load more