这是我的输入字段。
<input disabled="" type="text" name="Name" #Name="ngModel"
[(ngModel)]="objEmailTemplates.Name" placeholder="Enter the name"
class="form-control" required >
objEmailTemplates.Name = "Hi ,your order will be placed on ";
我想在光标位置添加字符串name
和date
,以便输出如下所示:
"Hi 'Piyush', your order will be placed on '22-25-2018' ";
如何在角度2中执行此操作。
答案 0 :(得分:0)
objEmailTemplates.Name = "Hi" + varName, your order will be placed on " + varDate;