I created files according to this page. The following works as expected:
Console:
However, this does not work:
Console:
![Screenshot 2023-09-25 at 16.13.06.png Click image for larger version
Name: Screenshot 2023-09-25 at 16.13.06.png
Views: 382
Size: 60.6 KB
ID: 97891](filedata/fetch?id=97891&d=1695680022&type=large)
The source in the developer window shows an anonymous function, which is not in my file:
![Screenshot 2023-09-25 at 16.14.50.png Click image for larger version
Name: Screenshot 2023-09-25 at 16.14.50.png
Views: 295
Size: 111.4 KB
ID: 97892](filedata/fetch?id=97892&d=1695680102&type=large)
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