We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15e200c commit c48d732Copy full SHA for c48d732
js/controller.js
@@ -63,11 +63,12 @@ export default class Controller {
63
/**
64
* Create and return a new controller
65
* @param {Controller} constructor - The constructor for the controller
66
+ * @param {...any} args - The arguments for the constructor
67
*/
- static New(constructor) {
68
+ static New(constructor, ...args) {
69
const C = constructor || Controller;
70
if (C.prototype instanceof Controller) {
- return new C();
71
+ return new C(args);
72
}
73
throw new Error(`Controller: Class ${C.name} is not a controller`);
74
0 commit comments