angular.js/example/temp.html

23 lines
691 B
HTML
Raw Normal View History

2011-01-20 21:38:14 +00:00
<!doctype html>
2012-01-07 02:10:47 +00:00
<html xmlns:ng="http://angularjs.org" ng:app>
2010-04-09 23:20:15 +00:00
<head>
2011-01-20 21:38:14 +00:00
<title>angular dev sandbox</title>
2012-01-07 02:10:47 +00:00
<script src="../src/angular-bootstrap.js"></script>
2011-01-20 21:38:14 +00:00
<script>
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'});
2011-01-20 21:38:14 +00:00
function MyCtrl() {};
}, {$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>
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>