mobilehero-archive / adamantium

:end: No longer Maintained -- Use {nativeloop} now: https://github.com/nativeloop
Other
8 stars 0 forks source link

Need way to configure which xml elements are controllers vs views #31

Open brentonhouse opened 8 years ago

brentonhouse commented 8 years ago

As a developer, I want to be able to use a controller as a custom xml element, So that I can fully take advantage of using custom modules in Alloy.

By default, almost every xml element is assumed to be a view. There is a const in Alloy called CONTROLLER_NODES that is currently defined: ['Alloy.Require', 'Alloy.Widget']

We need to add a way for a developer to add items to this list, probably using the config.json file. This way when a developer is using a custom module, it can be defined as a controller so that Alloy can handle the code generation properly.

Current workaround is to use <Require id="page" src="ui/page" />