3

Can I get true/false when I am typing content ? I have to show/hide submit button by using *ngIf option ?

When I am using form we use this form.controls['name'].dirty it should be true or false

My code stackblit

<h5 contenteditable="true"(input)="issueTitle=$event.target.textContent" #titletag>Test </h5>
<button *ngIf="">submit</button>
3
  • (ngModelChange) with [(ngModel)]? Commented May 23, 2019 at 7:38
  • Didnt understand Commented May 23, 2019 at 8:14
  • Can you explain your requirement again? Commented May 23, 2019 at 9:10

1 Answer 1

3

You can try like this.

HTML

<h5 contenteditable="true" (keyup)="onKey($event)"> Test </h5>
<button *ngIf="isSubmitShow">submit</button>

TS

isSubmitShow: boolean = true;
onKey(data) {
 this.isSubmitShow = !this.isSubmitShow;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.