我知道提交事件propertyCommit和propertyCommitted以及如何使用它们来获取当前提交的值,但是我不知道如何以编程方式附加值
这是我的源对象
class Person {
name: string;
email: string;
createdBy: string;
constructor(name,email){
this.name = name;
this.email = email;
}
在我的CreateUserCompenent中:
...
userSourceObj: User; // this is my variable for the source object
...
ngOnInit() {
this.userSourceObj = new User('John Doe','john.doe@bar.com');
}
我想在表单提交期间将一个值附加到用户对象的createdBy字段中。