mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
22 lines
708 B
HTML
22 lines
708 B
HTML
<!doctype html>
|
|
<html xmlns:ng="http://angularjs.org">
|
|
<head>
|
|
<title>angular dev sandbox</title>
|
|
<script src="../src/angular-bootstrap.js" ng:autobind></script>
|
|
<script>
|
|
angular.service('routeConfig', function($route) {
|
|
$route.when('/view1', {controller: MyCtrl, template: 'view1.html'});
|
|
$route.when('/view2', {controller: MyCtrl, template: 'view2.html'});
|
|
|
|
function MyCtrl() {};
|
|
}, {$inject: ['$route'], $eager: true});
|
|
</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>
|
|
|
|
view: <ng:view></ng:view>
|
|
</body>
|
|
</html>
|