Skip to content
Source
Sign inSign up
TanStack/store
Open History to see the last commit

increment.component.ts

16 lines377 Bytes

1import { Component, input } from '@angular/core'
2import { updateState } from './store'
3​
4@Component({
5 selector: 'app-increment',
6 template: `
7 <button (click)="updateState(animal())">
8 My Friend Likes {{ animal() }}
9 </button>
10 `,
11 standalone: true,
12})
13export class IncrementComponent {
14 animal = input.required<'cats' | 'dogs'>()
15 updateState = updateState