Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-646

Alloy: Module args on method

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Runtime, XML
    • Labels:
    • Environment:

      Alloy 1.1

      Description

      Hi Tony,

      Problem: How do we do this with <Module> markup:

      oldscrool.js

      var instance = Module.createView({
          backgroundColor:"#000",
          options : {
          	tintColor:"#444",
              pageMode : myVariable
          }
      });
      

      alloy

      <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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              viezel Mads Moller
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration