• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    future defining of usermodule required scripts/functions help

    Dashboard Designer & Custom AngularJS Pages
    2
    4
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MattFoxM
      MattFox
      last edited by

      This will likely be a Jared question...
      Using latest mangoUI system and have noticed you've moved to using ES6's import and export calls. At the moment I call everything I need with the define() method but seeing how some of my code involves expanding on some of the Amcharts code, I can no longer easily pull the references I need to make my code work...
      Am I going to need to rejig userModule some time soon to use ES6? if so I may need some assistance with my code that uses maRequire to load component controllers on a per page basis...
      Not quite in the mood for a complete overhaul of my code right at the moment...

      Do not follow where the path may lead; go instead where there is no path.
      And leave a trail - Muriel Strode

      Jared WiltshireJ 1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire @MattFox
        last edited by

        @mattfox said in future defining of usermodule required scripts/functions help:

        At the moment I call everything I need with the define() method but seeing how some of my code involves expanding on some of the Amcharts code, I can no longer easily pull the references I need to make my code work...

        User modules will still use AMD/RequireJS style require/define imports. You should be able to import most of the files which you may need. It was bought to my attention yesterday that this might not be the case with the PointValueController.js file, I will probably rejig this into an AngularJS service for easy injection. If you don't want to change anything I would suggest copying the version from the 3.3 branch - https://github.com/infiniteautomation/ma-dashboards/blob/3.3.x/UI/web/ngMango/directives/PointValueController.js

        @mattfox said in future defining of usermodule required scripts/functions help:

        Am I going to need to rejig userModule some time soon to use ES6?

        No

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • Jared WiltshireJ
          Jared Wiltshire
          last edited by

          @MattFox The UI module release v3.4.3 will have point value controller available as a service (maPointValueController).

          See one of the directives in git for how to inject and use it -
          https://github.com/infiniteautomation/ma-dashboards/blob/main/UI/web-src/ngMango/directives/indicator.js

          Developer at Radix IoT

          1 Reply Last reply Reply Quote 0
          • MattFoxM
            MattFox
            last edited by

            Thanks for doing this on such short notice Jared

            Do not follow where the path may lead; go instead where there is no path.
            And leave a trail - Muriel Strode

            1 Reply Last reply Reply Quote 1
            • First post
              Last post