Issue
//////!this code is not working showing the error [Type 'boolean' is not assignable to type 'string']////////////need a little help toggleserverstatus () {
this.statusflag = !this.statusflag;
if (this.statusflag == true) {
this.serverstatus='online';
}
return this.serverstatus;
}
}
Solution
You have quotes around the initial assignment of what you wanted to be False to statusflag. 'false'
is not the same as False
.
Answered By - Lyle Gunderson
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.