angular.js/i18n/e2e/localeTest_en.html

49 lines
1.8 KiB
HTML
Raw Normal View History

<!document html>
<html>
2011-08-18 00:27:15 +00:00
<head>
<meta charset="utf-8">
<title>locale test</title>
<script src="../../build/angular.js" ng:autobind></script>
<!-- not needed, already bundled in angular.js
<script src="../../build/i18n/angular-locale_en.js"></script>
-->
2011-09-08 20:56:29 +00:00
<script>
function AppCntl(){
this.input = 234234443432;
this.plInput = 1;
this.person1 = "Shanjian";
this.person2 = "Di";
this.plInput2 = 1;
}
</script>
</head>
2011-09-08 20:56:29 +00:00
<body ng:controller="AppCntl">
2011-08-18 00:27:15 +00:00
<h3>Datetime/Number/Currency filters demo:</h3>
2011-09-08 20:56:29 +00:00
<input type="text" ng:model="input" value="234234443432"><br>
2011-08-18 00:27:15 +00:00
date(medium): {{input | date:"medium"}}<br>
date(longDate): {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
2011-08-18 00:27:15 +00:00
<hr/>
<h3>Pluralization demo:</h3>
2011-09-08 20:56:29 +00:00
<input type="text" ng:model="plInput"><br>
2011-08-18 00:27:15 +00:00
<ng:pluralize count="plInput"
when= "{ '0': 'You have no email!',
'one': 'You have one email!',
'other': 'You have {} emails!'}">
</ng:pluralize>
<hr/>
<h3>Pluralization demo with offsets:</h3>
2011-09-08 20:56:29 +00:00
Name of person1:<input type="text" ng:model="person1"/><br/>
Name of person2:<input type="text" ng:model="person2"/><br/>
<input type="text" ng:model="plInput2"><br>
2011-08-18 00:27:15 +00:00
<ng:pluralize count="plInput2" offset=2
when= "{'0':'Nobody is viewing!',
'1': '{{person1}} is viewing!',
'2': '{{person1}} and {{person2}} are viewing!',
'3': '{{person1}}, {{person2}} and one other person are viewing!',
'other': '{{person1}}, {{person2}} and {} other people are viewing!'}">
</ng:pluralize>
</body>
2011-08-18 00:27:15 +00:00
</html>