source: node_modules/sprintf-js/demo/angular.html@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 690 bytes
Line 
1<!doctype html>
2<html ng-app="app">
3<head>
4 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.3/angular.min.js"></script>
5 <script src="../src/sprintf.js"></script>
6 <script src="../src/angular-sprintf.js"></script>
7</head>
8<body>
9 <pre>{{ "%+010d"|sprintf:-123 }}</pre>
10 <pre>{{ "%+010d"|vsprintf:[-123] }}</pre>
11 <pre>{{ "%+010d"|fmt:-123 }}</pre>
12 <pre>{{ "%+010d"|vfmt:[-123] }}</pre>
13 <pre>{{ "I've got %2$d apples and %1$d oranges."|fmt:4:2 }}</pre>
14 <pre>{{ "I've got %(apples)d apples and %(oranges)d oranges."|fmt:{apples: 2, oranges: 4} }}</pre>
15
16 <script>
17 angular.module("app", ["sprintf"])
18 </script>
19</body>
20</html>
Note: See TracBrowser for help on using the repository browser.