Hallo arbeite ich an AngularJS Komponente, brauche Hilfe wie $ Watch innerhalb Konstruktor() wie unten zu verwenden Ich habe meine Code-Struktur beigefügt.
import template from './Mypage.component.html';
export const MyComponent = {
template,
bindings: {
myData: '<'
},
controller: class MyController {
constructor($scope) {
$scope.$watch(() => this.myData, newVal => {
this._myFunction();
});
}
}