I\'ve been upgrading my custom directives to the new component architecture. I\'ve read that components do not support watchers. Is this correct? If so how do you detect cha
I'm late. But it can help to another people.
app.component("headerComponent", { templateUrl: "templates/header/view.html", controller: ["$rootScope", function ($rootScope) { let $ctrl = this; $rootScope.$watch(() => { return $ctrl.val; }, function (newVal, oldVal) { // do something }); }] });