diff options
| author | Misko Hevery | 2010-04-27 11:18:08 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-04-27 11:18:08 -0700 |
| commit | fce48eb60a47be87a3d95e0750e54c19c2a346d0 (patch) | |
| tree | 6a866e1dd82c43de9cef61e13a98a79442a59a4e /scenario | |
| parent | b275403465cdc581804bc74bf12e243edd642a42 (diff) | |
| download | angular.js-fce48eb60a47be87a3d95e0750e54c19c2a346d0.tar.bz2 | |
resources now use browser mock
Diffstat (limited to 'scenario')
| -rw-r--r-- | scenario/application-account.html | 4 | ||||
| -rw-r--r-- | scenario/application.html | 17 | ||||
| -rw-r--r-- | scenario/widgets.html | 2 |
3 files changed, 20 insertions, 3 deletions
diff --git a/scenario/application-account.html b/scenario/application-account.html index 8520d07c..a43deffc 100644 --- a/scenario/application-account.html +++ b/scenario/application-account.html @@ -1,4 +1,6 @@ -<div> +<div ng-controller="AccountController"> account page goes here! + <input type="text" name="name" value="misko"/> + <button ng-click="hello()">hello</button> </div> diff --git a/scenario/application.html b/scenario/application.html index be6390f6..6b6ced69 100644 --- a/scenario/application.html +++ b/scenario/application.html @@ -3,6 +3,18 @@ <head> <link rel="stylesheet" type="text/css" href="style.css"></link> <script type="text/javascript" src="../src/angular-bootstrap.js#autobind"></script> + <script> + function AccountController(){ + } + + AccountController.prototype = { + hello: function(){ + alert(this.name); + } + + }; + + </script> </head> <body ng-init="$window.$scope = this"> [ <a href="#login">login</a> @@ -11,9 +23,12 @@ <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:include ng-switch-when="account" src="'application-account.html'"></ng:include> </ng:switch> + + (( input name )) + <pre>$location={{$location}}</pre> </body> </html> diff --git a/scenario/widgets.html b/scenario/widgets.html index 1341f7cb..61badf1c 100644 --- a/scenario/widgets.html +++ b/scenario/widgets.html @@ -1,4 +1,4 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + <!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"/> |
