我想把文本框中的第一个字母作为资本,但我不知道如何应用它.例如sitholimela ----> Sitholimela
我想将其应用于文本框.
谢谢你的帮助.
我正在开发一个 Angular 系统来进行增强,我要做的更改之一是允许电子邮件地址输入接受多个电子邮件地址。我在网上进行了深入挖掘以获取一些想法,但我似乎没有看到有角度的想法。我只得到 Jquery 示例。
如何允许电子邮件地址输入接受多个电子邮件地址?
我做了什么:
超文本标记语言
<div>
<input name="contactEmail" placeholder="Contact Email" formControlName="contactEmail"
class="input- group input-group-md" type="text" [(ngModel)]="newCustomer.email" multiple>
</div>
Run Code Online (Sandbox Code Playgroud)
组件.ts
public newCustomer: any = {
name: undefined,
cont1: undefined,
email: [],
phone1: undefined,
balance: 0.0
};
onCustomerSubmit() {
if (!this.addCustomerForm.invalid) {
//other code
this.customerService.addCustomer(this.newCustomer, true, this.seller.name).then(data => {
console.log("This is the data: " +data)
if (data != null) {
this.loadCusromers();
this.onCustomerReset();
this.messageService.add({ severity: 'success', summary: 'New Customer', detail:
'Customer is added successful.' });
this.getCustomers();
} else { …Run Code Online (Sandbox Code Playgroud) 我有一个按钮,我希望每次保存时它都会增加一(1).它必须显示在标签上.我正在努力将正确的格式添加到标签中,以便每次单击保存时都会显示该格式.
public void versionIncrement()
{
count = Convert.ToInt32(lblOutput.Text.ToString()) + 1;
lblOutput.Text = "1000" + count.ToString();
lblOutput.Visible = true;
}
Run Code Online (Sandbox Code Playgroud) 我有两个名为Load和New 的按钮。首先,您必须加载文件。然后,当您单击“新建”按钮时,它必须复制您加载的文件,覆盖它,并同时修改上次修改日期。我怎样才能做到这一点?我尝试了下面的代码,但没有任何反应。
我在“新建”按钮下复制文件的代码:
FileInfo originalfile = new FileInfo(PathSelection);
FileInfo newfile = new FileInfo(PathSelection);
Run Code Online (Sandbox Code Playgroud)