Copied to clipboard

Flag this post as spam?

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


  • Juan Martinez 8 posts 38 karma points
    Nov 20, 2014 @ 22:07
    Juan Martinez
    0

    Umbraco dashboard Angular js problem.

    Hello community. I am new to umbraco , and currently fighting for all day with the following issue: I've added to dashboard custom section.

    Here is dashboard.config

    <section alias="StatisticsDashboardSection">
    <areas>
      <area>statistics</area>
    </areas>
    <tab caption="Statistics">
      <control showOnce="false" addPanel="false" panelCaption="">
        views/dashboard/statistics/statistics.html
      </control>
    </tab>
    <tab caption="OS,Browsers">
      <control showOnce="false" addPanel="false" panelCaption="">
        views/dashboard/statistics/browsers.html
      </control>
    </tab>
    

    Idkn if I did it right :) But I can see in dashboard new section , with the 2 tabs showing the content i need.

    in statistics.html I've added the angular controller:

      var visitorsData;
    function StatsController($scope, $http) {
    
        $scope.firstName = "John",
        $scope.lastName = "Doe",
        $scope.TEST = "fdfsdf",
    
    
    };
    

    and I can "render" my scope variables in html using {{firstname}}.

    I did the same for second Tab that points to - browsers.html but on this page angular doesn't work , also any other script i put there doesn't work. I put alert on load , this never happens.

    Where can I read how to do it properly ? Thanks, maybe someone can explain short tips why this happens :)

    Thanks.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 21, 2014 @ 07:40
    Jan Skovgaard
    0

    Hi Juan

    What does the content of your views look like? Perhaps there is a typo or you missed a reference somewhere. Please share all of your code - that will make it easier to help you out.

    Some pages that are worth bookmarking when it comes to Umbraco and angularjs are http://umbraco.github.io/Belle/#/api and https://github.com/umbraco/AngularWorkbook btw.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft