There is a directive in which data is transmitted:
export default class MenuDir { constructor() { this.scope = { menu: '=', selected: '=' }, this.restrict = 'E'; this.controllerAs = 'menuCtrl'; this.controller = MenuDirCtrl; this.templateUrl = '/templates/menu-template.html' } } class MenuDirCtrl { constructor($scope) { this.$scope = $scope; this.data = $scope.menu; **setTimeout(() => {console.log($scope.menu); console.log(this); return 1}, 3000);** } selectMenu(menu) { this.$scope.selected = menu; } isSelected(menu) { return menu === this.$scope.selected; } } HTML:
<app-dir> <menu-dir menu="appCtrl.data" selected="appCtrl.selected"></menu-dir> </app-dir> menu = "appCtrl.data" - receives data from the server and of course data appears after initialization, but when it is received it is transmitted but not redefined in this.data = $ scope.menu; and this.data remains empty, how to solve this problem without starting the digest cycle?