<p-inputMask> Problem, Need Quick Help

UI Components for Angular
Post Reply
dsouvik
Posts: 2
Joined: 19 Jan 2017, 19:01

19 Jan 2017, 20:36

Hello All,
I am trying to use <p-inputMask in my angular app, I need to inject some html aria-* attribute to it's child <input type=text element, so that my disabled user get speech prompt for that. But it's not reflecting in child element, any idea how to achieve that?

My HTML Code

Code: Select all

<p-inputMask *ngIf="elementData.definition.mask"
                         [attr.id]="elementData.definition.elementDefinitionId"
                         [(ngModel)]="elementData.value"
                         [mask]="elementData.definition.mask"
                         [attr.size]="parseDetails(elementData.definition.details, 'size')"
                         [attr.maxlength]="parseDetails(elementData.definition.details, 'maxLength')"
                         [placeholder]="elementData.definition.mask"
                         [attr.aria-label]="elementData.definition.label">
</p-inputMask>
My Ouput HTML

Code: Select all

<p-inputmask 
         class="ui-inputtext-postal-code ng-valid ng-touched ng-dirty" 
         ng-reflect-klass="ui-inputtext-postal-code" 
         ng-reflect-ng-class="[object Object]" 
         ng-reflect-mask="a9a 9a9" 
         ng-reflect-placeholder="a9a 9a9" 
         ng-reflect-model="" id="56092" 
         size="30" 
         maxlength="7" 
        aria-label="Postal code">
                    <input pinputtext="" 
                                 type="text" 
                                 ng-reflect-value="f4f 4f4" 
                                 placeholder="a9a 9a9" 
                                 class="ui-inputtext ui-corner-all ui-state-default ui-widget">
</p-inputmask>
Please let me know how to pass attributes into the dynamically created child input element.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests