I created files according to this page. The following works as expected:
Console:
However, this does not work:
Console:
The source in the developer window shows an anonymous function, which is not in my file:
How is this supposed to work?
Code:
define('calendar2:controllers/calendar2', ['controllers/record'], function (Dep) { return Dep.extend({ actionHello: function (options) { console.log('action: hello'); }, }); });
Code:
action: hello
Code:
import Controller from 'controllers/record'; class Calendar2Controller extends Controller { actionHello(options) { console.log("action: hello") } } export default Calendar2Controller;
The source in the developer window shows an anonymous function, which is not in my file:
How is this supposed to work?
Comment