提问人:pacocom 提问时间:11/9/2023 更新时间:11/9/2023 访问量:22
如何测试该订阅?
How to test that subscription?
问:
如何在函数内测试订阅,表单是一个 NgForm --> (FormGroupDirective),表单的作用域在 formChanges 函数内。
formChanges(form: FormGroupDirective) {
form.control.get('roles')?.valueChanges.subscribe((value) => {
this.selected = value;
});
}
我想测试角色值何时发生变化。
谢谢。
答: 暂无答案
评论
selected