Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="app" ng-controller="AppCtrl">
  <form name="form" class="container">
    <label> Custom control</label>
    <my-control name="field" ng-model="text"></my-control>
    <div><b>Model value:</b> {{text}}</div>
  </form>
  <script type="text/ng-template" id="myControl.tpl">
    <input type="text" ng-model="value" class="form-control" ng-pattern="'^(?!ng-*)'" minlength="3">
    <div><b>Errors:</b> {{innerModel.$error}}</div>
  </script>
</body>
</html>
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers