Currently, I am working on a "simple" program in TypeScript and HTML. My comments are in my native language but they are not providing much information. Despite trying various approaches, I can't seem to get my buttons to function properly.
I am aware that ngOnInit is triggered at the beginning of the website, but I included saveNumbers() there just to monitor the progress of the program over time.
Moreover, the input numbers remain static and do not change.
Component's template:
<body>
<h1>{{ title }}</h1>
<div id="grid">
...
</div>
<div id="stevila">
...
</div>
<div id="grid2">
...
</div>
<router-outlet></router-outlet>
</body>
Component:
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { clearInterval } from 'node:timers';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
@ViewChild('inputElement') inputElement!: ElementRef;
...