Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • André Lange 108 posts 410 karma points
    Apr 16, 2020 @ 06:55
    André Lange
    0

    Displaying data from controller on custom dashboard.

    I have created a custom dashboard, (just so i know how), it is displayed correctly and the controller seems to work, since i can activate an alert.

    But when i try to display forexample a headline which i set in the controller, nothing appears..

    My code:

    Html

    <umb-box>
        <umb-box-content ng-controller="My.TestDashboard as vm">
            <h3>{{vm.Headline}}</h3>
            <p>This is just a test to see a working dashboard</p>
        </umb-box-content>
    </umb-box>
    

    Js controller

    angular.module("umbraco")
        .controller("My.TestDashboard", function ($scope) {
            var vm = this;
            vm.Headline = "My Custom Testing Dashboard";
    
        });
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies