[ALOY-646] Alloy: Module args on method
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-07-07T16:55:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Runtime, XML |
Labels | markup, module, native |
Reporter | Mads Moller |
Assignee | Unknown |
Created | 2013-04-30T08:15:37.000+0000 |
Updated | 2018-03-07T22:28:29.000+0000 |
Description
Hi Tony,
Problem: How do we do this with markup:
var instance = Module.createView({
backgroundColor:"#000",
options : {
tintColor:"#444",
pageMode : myVariable
}
});
<test>
<Module id="myModule" module="my.module" method="createView" backgroundColor="#000" options="???" />
</test>
Suggestion:
No method - only module reference and a lazyOnInit (or whatever name :) ) property that not are being called before its run in the controller.
<test>
<Module id="myModule" module="my.module" lazyOnInit="createView" />
</test>
$.myModule.lazyOnInit({
backgroundColor:"#000",
options : {
tintColor:"#444",
pageMode : myVariable
}
});
Does it make sence?
Mads
Can't you just do this with TSS? The create function you specify in the "method" attribute should make use of any TSS that applies to it.
Closing as invalid. If this is incorrect, please reopen.