Yes you can use them inside the AMD module but keep in mind once you add an event listener on the window object it will be called everytime there is an action:ajaxify.end. If you don't want it triggered after you leave that page you need to turn it off with $(window).off('eventName', myMethod)
Error: Route.get() requires callback functions but got a [object Undefined]
In my library.js I need to create a custom route so I do:
params.router.get('/admin/test/:nameTest', params.middleware.admin.buildHeader, controllers.renderTest);
But I obtain "Error executing 'static:app.load' in plugin 'nodebb-plugin----". Anyone can help me to resolve this problem?