function Testing(req) { this.name = req.params.name; tts.when([this.loadLeft(), this.loadRight()]).then(val=>{ alert("All DOne"); }); } /* Redirect user if no hash tag was found */ if (location.hash == '') { location.hash = '#Hello'; } tts.DoCacheAssets = false; tts.Router.get('Testing/:name', function(req) { tts.getAsset({name: 'testing.js', path: ajax_folder}).then(val=>{ var obj = new Testing(req); }); }); tts(function() { /* let dp = new tts.DeferredPromise(); dp.then(val=>{ alert(val.name); }); dp.resolve({name: 'Luke'}); * */ });