Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-maxlength not working for a variable #6952

Closed
@jayanthakgjls

Description

@jayanthakgjls

I'm trying to use ng-maxLength directive to give a variable max-length for my inputs.

   <input type="text" ng-model="name" ng-maxlength="$metadata.maxLength" ng-required="$metadata.isRequired" name="name" /> 

But it doesn't seems to be working as expected. When it is applied the model binding for the same variable is not working. Here is my plunker http://plnkr.co/edit/NHNaswIIZqcdrOurYXVM?p=preview

If I remove ng-maxLength ng-required is going to work as expected , otherwise ng-required is also not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions