In my main.ts file, there is a global variable named rowTag
which is an array of Tag[]
entities.
Additionally, I have an angular controller named TagMeController.ts
.
Below is the constructor of TagMeController
:
constructor($scope, $rootScope) {
$scope.CloseMe = this.CloseMe;
$scope.rowTags = rowTag; // referring to the global variable
$scope.colTags = colTag; // another global variable
$scope.UpdateMe = this.UpdateMe;
}
When I update the rowTag
object from the same controller, the changes are reflected in the UI. However, if I update the same object from a different .ts
file (main.ts), the changes are not reflected.
Any suggestions on how to make this variable observable?