jQWidgets Forums

jQuery UI Widgets Forums Angular jqxPasswordInput error

This topic contains 3 replies, has 2 voices, and was last updated by  Ivo Zhulev 7 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxPasswordInput error #97526

    martr
    Participant

    i have error
    Error in ./UserProfileComponent class UserProfileComponent – inline template:336:70 caused by: If ngModel is used within a form tag, either the name attribute must be set or the form
    control must be defined as ‘standalone’ in ngModelOptions.

    my code:
    <form id=”formPass” action=”./” >
    <div class=”form-group field-newpasswordform-password required”>
    <jqxPasswordInput #password id=”password” [(ngModel)]=”newPassword” [width]=”300″ [name]=’newPass’ [height]=”25″ >
    </jqxPasswordInput>
    </div>
    <button (click)=”sendNewPass()” class=”btn btn-default btn-large”>send</button>
    </form>`
    What am I doing wrong?

    jqxPasswordInput error #97528

    Ivo Zhulev
    Participant

    Hi martr,

    Have you imported the forms module – import { FormsModule } from '@angular/forms'; in your module file?

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

    jqxPasswordInput error #97546

    martr
    Participant

    yes, i imported the forms module in app.module

    jqxPasswordInput error #97556

    Ivo Zhulev
    Participant

    Hi martr,

    Try on of these:

    Example 1: <jqxPasswordInput [(ngModel)]="newPassword" name="password"></jqxPasswordInput>
    Example 2: <jqxPasswordInput [(ngModel)]="newPassword" [ngModelOptions]="{standalone: true}"></jqxPasswordInput>

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.