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
form(this.passwords, (f) => {
  validateTree(f, ({ value }) =>
    value().password !== value().confirm
      ? { kind: 'mismatch', fieldTree: f.confirm }
      : null
  );
});
Angular code in a dark editor tab named star-rating.ts. A StarRating component has a template that loops over stars 1 to 5 with @for, rendering a button for each one. A button gets the class "on" when its star is less than or equal to value(), is disabled when disabled() is true, and calls value.set(star) when clicked. The class (highlighted) implements FormValueControl<number> and has just two members: value = model(0) and disabled = input(false). Below, a ReviewPage component imports FormField and StarRating and uses <star-rating [formField]="reviewForm.rating" /> in its template. It has a review signal with rating 0 and an empty comment, and reviewForm = form(this.review, ...) with a rule min(path.rating, 1) and the message "Pick at least one star".
Angular TypeScript code in a dark editor tab named signup.ts. A Signup component with a template: a form whose submit event calls save($event), an email input bound with formField, a loop showing the email field's error messages, a password input, and a button that reads "Saving…" while signup().submitting() is true and "Sign up" otherwise (highlighted). The class injects AccountApi and creates a signal form with email and password, validating the email format and requiring the password. The save method prevents the default submit and calls submit(this.signup, async (f) => ...) (highlighted). Inside, it calls this.api.register with the form value. If the result's error is EMAIL_TAKEN, it returns an array with one error object: fieldTree: f.email (highlighted), kind: 'server', message: 'This email is already registered'. Otherwise it returns undefined.