Source

garmin-plugin / tests / knockout_test.html

Full commit
<html>
  <head>
    <script src="../vendor/require.js"></script>
    <script>
    require.config({
      paths: {
        'jquery': '../vendor/jquery-1.7.2',
        'underscore': '../vendor/underscore-1.3.3',
        'garmin': '../src/garmin'
      },
      shim: {
        'underscore': {exports: '_'}
      },
      urlArgs: "bust=" + (new Date().valueOf())
    });
    require(['jquery', 'garmin'], function($, Garmin) {
      var g = new Garmin.Communicator();
      
      $(function() {
        
        g.selectDevice(0).then(
          function() {
            g.readActivities().then(
              function(data){
                $('textarea').text(data);
              });
          }
        );
        
      });
    });
    </script>
  </head>
  <body>
    <textarea>
      
    </textarea>
  </body>
</html>