mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-28 21:05:43 +08:00
added ng:switch widget
This commit is contained in:
19
scenario/application.html
Normal file
19
scenario/application.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!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>
|
||||
</head>
|
||||
<body ng-init="$window.$scope = this">
|
||||
[ <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>
|
||||
</ng:switch>
|
||||
|
||||
<pre>$location={{$location}}</pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user