aboutsummaryrefslogtreecommitdiffstats
path: root/example/personalLog/personalLog.html
blob: 9d3af77d4bfdfc21b73549de2e096166600c3c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!doctype html>
<html xmlns:ng="http://angularjs.org">
  <head>
    <title>Personal Log</title>
    <script type="text/javascript" src="../../src/angular-bootstrap.js" ng:autobind></script>
    <script type="text/javascript" src="personalLog.js"></script>
  </head>


  <!-- TODO: we need to expose $root so that we can delete cookies in the scenario runner, there
             must be a better way to do this -->
  <body ng:controller="example.personalLog.LogCtrl">

    <form action="" ng:submit="addLog(newMsg)">
      <input type="text" name="newMsg" />
      <input type="submit" value="add" />
      <input type="button" value="remove all" ng:click="rmLogs()" />
    </form>

    <hr/>
    <h2>Logs:</h2>
    <ul>
      <li ng:repeat="log in logs.$orderBy('-at')">
        {{log.at | date:'yy-MM-dd HH:mm'}} {{log.msg}}
        [<a href="" ng:click="rmLog(log)">x</a>]
      </li>
    </ul>

  </body>
</html>