JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-controller="BaseController">
    <p>Base Controller Value: {{shared.value}}</p>
    <button ng-click="updateValue()">Update In Base</button>
    <div ng-controller="DerivedController">
        <p>Derived Controller Value: {{shared.value}}</p>
        <button ng-click="updateValue()">Update In Derived</button>
    </div>
</div>

JavaScript

var myApp = angular.module('myApp',[]);

function BaseController($scope) {
    $scope.shared = {};
    $scope.shared.value = "Initial Value";
    $scope.updateValue = function () {
        $scope.shared.value = "Value updated from Base";
    };
}

function DerivedController($scope) {
    $scope.updateValue = function () {
        $scope.shared.value = "Value updated from Derived";
    };
}