Copied to clipboard

Flag this post as spam?

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


  • AbsolutelyN 89 posts 437 karma points
    Jan 27, 2023 @ 10:12
    AbsolutelyN
    0

    $rootScope.$broadcast not working after upgrade to 10.4 or 11.1

    I was testing upgrading a website from 10.3.2 to 10.4 and have found that some of my backoffice custom controllers are no longer working.

    Basically anywhere which calls $rootScope.$broadcast('event_name', { data: 'xxx' }) to pass data to sub controls no longer seems to work when used in umb-editor-view / umb-editor-sub-views.

    On upgrading to 11.1 it is the same.

    In parent controller:

    $rootScope.$broadcast('user_init', {
      user: myUser
    });
    

    In child controller - never triggers

    $scope.$on("user_init", function (evt, model) {
      vm.user = model.user;
    }
    

    Its probably not how data should be passed between controllers in editor view but anyone know why or able to give example of the correct way?

Please Sign in or register to post replies

Write your reply to:

Draft