Uncaught TypeError: Cannot read property 'myClass' of undefined
define(["credits"], function(credits) { return { myClass: class{ constructor() { this.try = new credits.try(); } write(){ console.log("Yes I did!"); this.try.ert(); }} } });
define(["purchase"],function(purchase) { return { try : class{ constructor() { this.myClass =new purchase.myClass(); } otherWrite(){ this.myClass.write(); } ert(){ console.log("I am credit"); } } } });
require(["purchase", "credits"],function(purchase, credits){ var x = new purchase.myClass(); x.write(); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)