Angular:

http://angularjs.org/

by Akram kamal

HTML

<div ng-controller="MyCtrl"> 
    <span ng-switch on="x">
      <div ng-switch-when="true" ng-include="'partial.html'"></div>
      <div ng-switch-default>default</div>
    </span>
</div>
<script type="text/ng-template" id="partial.html">
    Content of the template.
</script>

JavaScript

var app = angular.module('myApp', []);

function MyCtrl($scope) {
    $scope.x = true;
}