Files
dario-piotrowicz 0d19be1996 refactor(docs-infra): add types to all the aio examples buttons (#44557)
add types to all the buttons in the angular.io examples to encourage
the best practice of always including a type per button (regardless
to whether it is in a form or now)

PR Close #44557
2022-02-03 12:44:47 -08:00

27 lines
563 B
TypeScript

// #docregion
import { Component } from '@angular/core';
@Component({
selector: 'app-version-parent',
template: `
<h2>Source code version</h2>
<button type="button" (click)="newMinor()">New minor version</button>
<button type="button" (click)="newMajor()">New major version</button>
<app-version-child [major]="major" [minor]="minor"></app-version-child>
`
})
export class VersionParentComponent {
major = 1;
minor = 23;
newMinor() {
this.minor++;
}
newMajor() {
this.major++;
this.minor = 0;
}
}
// #enddocregion