I'm trying to run a function once clicking a button. Down is my current code but it doesn't work. This is not my main app.component, I'm trying to do this in my second tab.
add-profile.component.html
<button ng-click="myFunc()">Click</button>
add-profile.components.ts
export class AddProfileComponent implements OnInit {
constructor() {
this.showWindow();
}
myFunc():void{
console.log("Works");
}
ngOnInit() {
}
}