18 lines
346 B
TypeScript
18 lines
346 B
TypeScript
|
import { Component } from "@angular/core";
|
||
|
import { ChildComponent } from "../Child/child.component";
|
||
|
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-parent',
|
||
|
standalone: true,
|
||
|
templateUrl: './parent.component.html',
|
||
|
imports: [ChildComponent],
|
||
|
})
|
||
|
export class ParentComponent {
|
||
|
public balance = 1000;
|
||
|
|
||
|
public addFifty() {
|
||
|
this.balance += 50;
|
||
|
}
|
||
|
}
|