【发布时间】:2018-06-20 16:36:44
【问题描述】:
这是我的代码 model.ts
export class Customer {
customer_id :number
firstname : string
lastname : string
email : string
telephone : number
password : string
}
component.ts
resetForm(form? : NgForm)
{
if(form!=null)
form.reset();
this.customerService.selectedCustomer=
{
customer_id : null,
firstname :'',
lastname :'',
email :'',
password:'',
telephone: //i want to pass 10 digit no here
}
我想将电话号码传递给webapi form angular 5.如何实现它
【问题讨论】:
-
这么简单
telephone = 1234567890? -
我不想硬编码号码。我想使用动态。我有一个客户注册表,每个客户都必须输入号码
-
所以将值绑定到某个变量或使用表单,简单!!