How to test changes on Component Bindings by parent element?
问题 I have a component like follows and would like to test what the $onChange method does in case the binding myBinding changes. I tried the whole morning, but could not find a way to solve this. angular .module('project.myComponent', []) .component('myComponent', { bindings: { myBinding: '<' }, template: '<div>{{$ctrl.result}}</div>', controller: myComponentController }); function myComponentController($filter, someService) { var ctrl = this; ctrl.result = 0; $ctrl.$onChange = function (changes)