AngularJS Example:

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-sanitize.js"></script>
<div ng-app="choicesApp">
  <ng-form name="choicesForm" ng-controller="ChoicesCtrl">
    <div ng-bind-html="trustCustom()"></div>
    Static Input: <input required type='text' ng-model='static'><br>
    <button ng-repeat="button in buttons" ng-disabled="buttonDisabled(choicesForm.$invalid)">
      {{button.text}}
    </button>
          {{choicesForm.$invalid}}
  </ng-form> 
</div>

JavaScript

angular.module('choicesApp', ['ngSanitize'])
  .controller('ChoicesCtrl', ['$scope', '$sce', function($scope, $sce) {
      $scope.buttonDisabled = function(invalid){
    	return invalid ? "checked" : "";
    };
    $scope.custom = "Dynamic Input: <input required type='text' ng-model='dynamic'>";
    $scope.trustCustom = function() {
      return $sce.trustAsHtml($scope.custom);
    };
    $scope.buttons = [
      {text:'Submit 1'},
      {text:'Submit 2'}];
}]);