• 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

    Custom View didn't work

    How-To
    3
    6
    1.4k
    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.
    • A
      ashleydiep
      last edited by

      Mango Core version: 3.6
      Mango UI module version: 3.6

      When I followed the tutorial on making custom views, after refreshing the Hello World doesn't show up in the menu. How can I fix this?

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

        Hi Ashley, welcome.
        Do you mean the userModule or an actual dashboard page with the dashboard designer?
        To give us a better idea of what you want to achieve, some code/markup text would be helpful. Be sure to use the code tags in the forum (a pair of 3 x ` together) to place the text between.

        Fox

        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 0
        • A
          ashleydiep
          last edited by

          Hello Fox,
          I mean the userModule. 0_1564149410913_Screen Shot 2019-07-26 at 8.52.19 AM.png 0_1564149417988_Screen Shot 2019-07-26 at 8.53.01 AM.png 0_1564149425495_Screen Shot 2019-07-26 at 8.53.29 AM.png

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by phildunlap

            Hi ashleydiep, welcome to the forum!

            I had a look, and I think the issue is that on the help page the quote marks in the define section of the mainModule.js file are stylized single quotes instead of real, JavaScript comprehensible single quotes. Thanks for bringing this to our attention! I have fixed the help page. After I made this change in my mainModule.js file, the menu appeared as the help suggested it would.

            define([
                'angular', 
                'require',
                './components/helloWorld.js'
            ], 
            function(angular, require, helloWorld) {
            'use strict';
            var mainModule = angular.module('userModule', ['maUiApp']);
                mainModule.component('helloWorld', helloWorld);
                mainModule.config(['maUiMenuProvider', function(maUiMenuProvider) {
                maUiMenuProvider.registerMenuItems([
                        {
                            name: 'ui.helloWorld',
                            url: '/hello-world',
                            menuText: 'Hello World',
                            menuIcon: 'accessibility_new',
                            abstract: true,
                            menuHidden: false,
                            weight: 996,
                        },
                        {
                            name: 'ui.helloWorld.home',
                            url: '/home',
                            template: '<hello-world></hello-world>',
                            menuIcon: 'fa-home',
                            menuText: 'Home',
                            weight: 997,
                            params: {
                                noPadding: false,
                                hideFooter: false,
                            },
                        },
                    ]);
                }]);
                return mainModule;
            });
            

            While i could have noticed this by the syntax highlighting in your post, I saved everything and loaded a page with my browser's developer tools open, found the mainModule.js on the sources tab, and saw that it had a syntax error on line 2.

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

              Thanks Phil, man time differences suck, 8AM here!

              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 0
              • phildunlapP
                phildunlap
                last edited by

                At least it makes for better time coverage on people getting responses :D

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