출력 바인딩이 제공되는지 확인하는 방법은 무엇입니까?출력 바인딩이 제공되는지 확인하는 방법은 무엇입니까?
Examplecode :
angular.module('tester', []);
angular.module('tester').component('test', {
template: '<h3></h3>',
bindings: {
callback : '&'
},
controller: function() {
// How to check if callback binding is given?
// typeof this.callback === 'function' returns true
// angular.isFunction(this.callback) also returns true
}
});
바인딩은 항상 함수이기 때문에 작동하지 않습니다. – tiktak