Answer the question
In order to leave comments, you need to log in
Why aren't console.logs being output?
There are two related components, one embedded in the other. The first component generates values, the second outputs them.
component1:
private rows: Array<any> = [];
constructor() {
for (let i = 0; i < 10; i++) {
this.rows.push(Math.random().toString(30).substring(2, 10));
}
setInterval(() => {
const ind = Math.ceil(Math.random()*10);
this.rows[ind] = '--------';
console.log('interval', ind);
}, 2500)
}
@Input() public data: string;
constructor() {
console.debug('constructor');
}
ngOnInit() {
console.debug('ngOnInit');
}
ngOnChanges(): void {
console.debug('change');
}
get rowData(): string {
console.debug('getting row data');
return this.data;
}
Answer the question
In order to leave comments, you need to log in
The problem is that the second component doesn't output any console.log().
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question