angular.js/scenario/application.html

35 lines
911 B
HTML
Raw Normal View History

2010-04-05 18:46:53 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="style.css"></link>
<script type="text/javascript" src="../src/angular-bootstrap.js#autobind"></script>
2010-04-27 18:18:08 +00:00
<script>
function AccountController(){
}
AccountController.prototype = {
hello: function(){
alert(this.name);
}
};
</script>
2010-04-05 18:46:53 +00:00
</head>
<body ng:init="$window.$scope = this">
2010-04-05 18:46:53 +00:00
[ <a href="#login">login</a>
| <a href="#account">account</a>
]
<ng:switch on="$location.hashPath">
<div ng:switch-when="login">login screen</div>
<ng:include ng:switch-when="account" src="'application-account.html'"></ng:include>
2010-04-05 18:46:53 +00:00
</ng:switch>
2010-04-27 18:18:08 +00:00
(( input name ))
2010-04-05 18:46:53 +00:00
<pre>$location={{$location}}</pre>
</body>
</html>