I am doing an online course in Angular i know nothing about programming I can't find a solution to my problem what is wrong and where should i even look for my mistake I am using no strict mode
My html code:
<button
class="btn btn-primary"
(click)="onToggleDetails()">Display details</button>
<p *ngIf="showSecret">Secret password = tuna</p>
<div *ngFor="let logAmount of log">{{ logItem }}</div>
My ts code:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
showSecret = false;
log = [];
onToggleDetails() {
this.showSecret = !this.showSecret;
this.log.push = (this.log.length + 1)
}
}
Any help and explanation would be appreciated !