出力バインディングが指定されているかどうかを確認する方法は?出力バインディングが指定されているかどうかを確認する方法は?
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