Issue
I am trying to make flip-card component to flip after button clicked I tried the following but I am getting this error
TS2322: Type '{ isFlipped: boolean; }' is not assignable to type 'boolean'.
this is my code flip-card.component.ts
export class FlipCardComponent implements OnInit { constructor() {}
isFlipped: boolean = false;
ngOnInit(): void {}
login(): void { console.log('Clicked'); this.isFlipped = true;
} }
flip-card.component.html
<nb-flip-card [showToggleButton]="false" [flipped]={isFlipped} >
Hello! Please indicate your name:
<button nbButton fullWidth status="primary" (click)="login()">Let's chat! A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases. Originally, nebula was a name for any diffuse astronomical object, including galaxies beyond the Milky Way.
I don't know what is the problem, can anyone help?
Solution
Try to change your template’s code by the next
nb-flip-card [showToggleButton]="false"
[flipped]=“isFlipped”>
Answered By - Nataly Chkhan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.