question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i'm use ngxMark with formControlName is error

See original GitHub issue

<input formControlName="totalPaymentMethod" mask="00*.00" [(ngModel)]="numberOrStringFormModel" >

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kosmickecommented, Nov 30, 2018

Updating: The mask works, even though it throws an error after the page is loaded.

First I thought it was because of the matInput but it wasn’t. Then I found the cause:

When the value is defined as an object the error occurs:
cpf: [{ value: ''}, [Validators.required]],

screenshot from 2018-11-30 09-46-16

But if its a simple value it doesn’t cpf: [‘’, [Validators.required]], cpf: ['', [Validators.required]], screenshot from 2018-11-30 09-48-35

1reaction
neilhemcommented, Nov 26, 2018

Bad practice using ngModel with formControlName

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can i fix Error: formControlName must be used with a ...
I'm getting this error: ERROR Error: formControlName must be used with a parent formGroup directive. You'll want to add a formGroup ...
Read more >
Can't Bind to formGroup Not Known Property Error in Angular
Let's take a look at why the “Can't bind to 'formGroup' since it isn't a known property of 'form'” error shows up and...
Read more >
Angular Custom Form Controls - Complete Guide
formControlName ) as we use for standard input boxes. ... ERROR Error: Must supply a value for form control with name: 'totalQuantity'. at ......
Read more >
Exploring the difference between disabling a form control ...
We will use this setup to illustrate the different ways to disable form controls. ... I'm using formGroup and formControlName directives from Reactive...
Read more >
Using Custom Async Validators in Angular Reactive Forms
I'm using @angular/material just to simplify our styles, ... matInput placeholder="Ex. Batman" formControlName="username" /> <mat-error ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found