Angular 1.3 Starting Point

by otupman

HTML

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.5/angular.js"></script>
<div ng:controller="ParentCtrl">
    <form novalidate="novalidate" name="testForm" ng:controller="ChildCtrl">
        
        <input type="text" required name="testField" ng:model="testField" class="form-control"/>
        <p>
            Required: {{testForm.testField.$error.required}}
            Pristine: {{testForm.testField.$pristine}}
        </p>
         <span class="error" 
                ng-show="testForm.testField.$error.required && !testForm.testField.$pristine">
      Required!</span>
        
        <div ng:messages="testForm.testField.$error" >
            <div ng:message="required">Required, bitch.</div>
        </div>
    </form>
</div>

JavaScript

angular
    .module('mcDemo', [])
    .controller('ParentCtrl', function($scope) {})
    .controller('ChildCtrl', function($scope) {})
;