Angular: ng-include test new scope

http://angularjs.org/

by Zmetser

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<ng-include src="'template.html'"></ng-include>
<ng-include src="'template.html'"></ng-include>

<script type="text/ng-template" id="template.html">
    <div ng-controller="MyCtrl">
        Hello, {{name}}!
    </div>
</script>

JavaScript

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

function MyCtrl($scope) {
    console.log($scope);
    $scope.name = 'Superhero';
}