examples/src/demo-app.js
function loadTemplate() {
  generateData();

  return new Promise(function(resolve, reject) {

    // Load handlebars page template.
    $.get('src/demo-template.html', function(response) {
      template = response;
      render();
      resolve();
    }).fail(function() {
      reject();
    });
  });
}
function loadTemplate() {
  generateData();

  return new Promise(function(resolve, reject) {

    // Load handlebars page template.
    $.get('src/demo-template.html', function(response) {
      template = response;
      render();
      resolve();
    }).fail(function() {
      reject();
    });
  });
}
function loadTemplate ( ) { generateData ( ) ; return new Promise ( function ( resolve , reject ) { // Load handlebars page template. $ . get ( 'src/demo-template.html' , function ( response ) { template = response ; render ( ) ; resolve ( ) ; } ) . fail ( function ( ) { reject ( ) ; } ) ; } ) ; }
Loads the demo template.
@return {Promise} Returns promise for loading template as successful/failure.
Loads the demo template .