Files
angular.js/example/temp.html
Misko Hevery 0a6e464a93 feat($route): rename template -> tempalteUrl and add support for inline templates
BREAKING CHANGE: template in $route definition is now templateUrl
To migrate just rename `template` to `templateUrl`.
2012-06-01 17:01:10 -07:00

31 lines
816 B
HTML

<!doctype html>
<html ng-app="example">
<head>
<title>angular dev sandbox</title>
<script src="../src/loader.js"></script>
<script>
setupModuleLoader(window);
angular.module('example', [], function($routeProvider) {
$routeProvider.when('/view1', {controller: MyCtrl, templateUrl: 'view1.html'});
$routeProvider.when('/view2', {controller: MyCtrl, templateUrl: 'view2.html'});
function MyCtrl($location, $scope) {
$scope.url = function() {
return $location.url();
}
};
});
</script>
<script src="../src/angular-bootstrap.js"></script>
</head>
<body>
<p>
<a href="#/view1">view1</a> | <a href="#/view2">view2</a> | <a href="#">blank</a>
</p>
<hr>
<div ng-view></div>
</body>
</html>