2011-01-20 21:38:14 +00:00
|
|
|
<!doctype html>
|
2010-07-29 19:50:14 +00:00
|
|
|
<html xmlns:ng="http://angularjs.org">
|
2010-04-09 23:20:15 +00:00
|
|
|
<head>
|
2011-01-20 21:38:14 +00:00
|
|
|
<title>angular dev sandbox</title>
|
|
|
|
|
<script src="../src/angular-bootstrap.js" ng:autobind></script>
|
|
|
|
|
<script>
|
2011-11-12 01:15:22 +00:00
|
|
|
angular.module.ng('routeConfig', function($route) {
|
2011-01-20 21:38:14 +00:00
|
|
|
$route.when('/view1', {controller: MyCtrl, template: 'view1.html'});
|
|
|
|
|
$route.when('/view2', {controller: MyCtrl, template: 'view2.html'});
|
2010-07-29 19:50:14 +00:00
|
|
|
|
2011-01-20 21:38:14 +00:00
|
|
|
function MyCtrl() {};
|
2011-11-12 22:57:43 +00:00
|
|
|
}, {$inject: ['$route']});
|
2011-01-20 21:38:14 +00:00
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body ng:init="$service('$window').$root = this">
|
|
|
|
|
<p>
|
|
|
|
|
<a href="#/view1">view1</a> | <a href="#/view2">view2</a> | <a href="#">blank</a>
|
|
|
|
|
</p>
|
2010-07-29 19:50:14 +00:00
|
|
|
|
2011-01-20 21:38:14 +00:00
|
|
|
view: <ng:view></ng:view>
|
2010-04-09 23:20:15 +00:00
|
|
|
</body>
|
2011-01-20 21:38:14 +00:00
|
|
|
</html>
|