<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy AngularJS Tutorial</title>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
    </head>
    <body>
        <form ng-app="" name="form" ng-init="minlength=4" >
            <h3>ng-minlength Directive example in AngularJS Tutorial</h3>
            Set a minlength
            <input type="number" ng-model="minlength" />
            <br/><br/>
            Enter the text or Number:
            <input type="text" ng-model="value" name="input" ng-minlength="minlength" /><br/><br/>
            <p>Form.input.$valid = {{form.input.$valid}}</p>
            <p>Model = {{value}}</p>
        </form>
    </body>
</html>


www.wikitechy.com © Copyright 2016. All Rights Reserved.