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
JavaScript code in signals.js. A variable currentEffect starts as null. A function signal(value) creates a Set called subscribers and a read function: if currentEffect is set, read adds it to subscribers (highlighted), then returns value. read.set(newValue) stores the new value and calls every subscriber with subscribers.forEach((fn) => fn()) (highlighted). signal returns read. A function effect(fn) sets currentEffect to fn, calls fn(), then sets currentEffect back to null. Usage: const count = signal(1); effect(() => console.log(count())) logs 1; count.set(2) logs 2.
TypeScript code in trip-planner.ts. An Angular component app-trip-planner has a template with a "Plan my trip" button that calls plan(), and an ordered list that renders each stop with @for (stop of trip().stops; track stop). In the class TripPlanner, highlighted: readonly store = injectAgentStore('planner'), and readonly trip = computed(() => this.store().state() as { stops: string[] }). The plan() method gets agent from this.store(), calls agent.setState({ city: 'Lisbon', stops: [] }) (highlighted) and then agent.runAgent().
"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
Photo, no description
TypeScript code in greeting.ts. A first comment says tsconfig.json has "erasableSyntaxOnly": true. Below, marked with a red cross and "error TS1294": enum Status { Active, Archived }. Then, marked with a green check and "decorators are fine": an Angular @Component with selector app-greeting and the template <p>{{ greeter.greet() }}</p>, for the class Greeting. Inside the class, marked with a red cross and "error TS1294", a commented-out constructor(private greeter: Greeter) {}. Then, marked with a green check and "OK": readonly greeter = inject(Greeter).
Modern Admin – Angular 15+ Bootstrap 5 Admin Dashboard Template
✨ Worth another look #CodeTrendy → Uplinkly - Branded Short Links

Create branded short links, connect custom domains, host landing pages, and track c
TypeScript code in product-tabs.ts. An Angular component app-product-tabs that imports RouterLink. Its template has two links. First, with the comment "Before: every tab click scrolls the page to the top": <a routerLink="." [queryParams]="{ tab: 'reviews' }">Reviews</a>. Second, highlighted, with the comment "Angular 22.3: the page stays where it is": the same link with scroll="manual" added. Below, a comment "app.config.ts" and provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'enabled' })).
Photo, no description
Photo, no description
TypeScript code in note.ts. An Angular component app-note whose template shows the same paragraph three times. "Before": a p with [ngClass]="{ pinned: pinned(), muted: muted() }" and [ngStyle]="{ 'font-size.px': size(), color: color() }". "After the migration: font-size is silently gone": the same p with [class] and [style] instead, the style object unchanged, highlighted. "Fix: put the unit in the value": [style]="{ 'font-size': size() + 'px', color: color() }", highlighted. The class Note has signals pinned (true), muted (false), size (18) and color ('gray').
"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.
TypeScript code in avatar.ts. An Angular component app-avatar with an inline template of three img tags, each with [src]="src()". First, with the comment "NG8119 warning: the browser ignores a length with no unit": [style.width]="40". Second, with the comment "Fix: put the unit in the binding": [style.width.px]="40". Third, with the comment "Careful: also ignored, but no warning (not a literal)": [style.width]="size()". The class Avatar has readonly src = input.required<string>() and readonly size = input(40). The three img lines are highlighted.
Apex – Angular 14+  Bootstrap 4 HTML Admin Template
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.
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 }}.
Photo, no description
Photo, no description
Load more