コンポーネント MyComp があり、関数をパラメーターとして渡したいと思います。より正確には、次のようなことをしたいと思います。
ダーツ コンポーネント ファイル:
@NgComponent(
selector: 'mycomp',
publishAs: 'ctrl',
map: const {
'myfunc' :'=> myfunc'
}
)
class MyComponent {
Function myfunc;
....
myfunc();
}
html:
<mycomp myfunc="ctrl.myfunc"></button-list>
問題は、コンポーネントで myfunc が null であることです。私は何かが恋しいですか?どうやってやるの?