I have 2 angular components : app-menu which use app-menuitem without transclude.
In index.html
<app-menu items="menuitems" ></app-menu>
In app-menu.html
<app-menuitem label="{{ item.label }}" isdisabled="item.isdisabled" ></app-menuitem>
In app-menuitem.html
<button data-ng-disabled="$ctrl.isdisabled">{{ $ctrl.label }}</button>
I would like to bind the attribute 'isdisabled' with a $rootScope variable in my controller like :
$scope.menuitems = [{label:"myButton", isdisabled: $rootScope.fooIsLoaded}, ...]
I manage to initialize it but not to bind it in order to refresh each time the $rootScope.fooIsLoaded value is changed which is the angular logic. Someone as an idea ?