出于一些奇怪的原因,在线没有任何教程或代码示例显示如何使用Angular2 Reactive表单,而不仅仅是简单的输入或选择下拉列表.
我需要创建一个表单让用户选择他们的头像.(图像文件)
以下不起作用.(即"头像"属性从不显示任何值更改.)
profile.component.html:
<form [formGroup]="profileForm" novalidate>
<div class="row">
<div class="col-md-4 ">
<img src="{{imgUrl}}uploads/avatars/{{getUserAvatar}}" style="width:150px; height:150px;float:left;border-radius:50%;margin-right:25px;margin-left:10px;">
<div class="form-group">
<label>Update Profile Image</label>
<input class="form-control" type="file" formControlName="avatar">
</div>
</div>
<div class="col-md-8 ">
<div class="form-group">
<label >Firstname:
<input class="form-control" formControlName="firstname">
</label>
</div>
<div class="form-group">
<label >Lastname:
<input class="form-control" formControlName="lastname">
</label>
</div>
<div class="form-group">
<label >Email:
<input class="form-control" formControlName="email">
</label>
</div>
<div class="form-group">
<label >Password:
<input class="form-control" type="password" formControlName="password">
</label>
</div>
</div>
</div>
</form>
<p>Form value: {{ profileForm.value | json }}</p>
<p>Form status: …Run Code Online (Sandbox Code Playgroud)在Kendo网格中有此列当前显示MySQL布尔值,因此我们有1或0.
这在autosync和inline:true网格中.
我希望这个列的类型为"Checkbox"但是,由于一些奇怪的原因,我只是在网络上找不到一个演示或示例,显示"启用"复选框,在取消选中时将1更改为0并且副Versa.
我在PHP中有点生锈,目前正在努力做一些非常简单的事情.
$value = "PUPPY";
$html .= '<td>{$value}</td>';
echo $html; // Doesn't work, prints {$value}.... Should be... PUPPY
Run Code Online (Sandbox Code Playgroud)
我知道有一种简单的方法可以做到这一点,但我忘记了,无法在Google或StackOverflow上找到明确的方法.
一旦完成,我需要将html放在一个变量中,它被tcpdf :: writeHtml()使用
我已经尝试过:
$html .= "<td align='right' nowrap>".$value."</td>";
echo $html; // But this outputs a TD tag with attribute nowrap="" and this is not valid HTML... tcpdf:writeHtml rejects this.
Run Code Online (Sandbox Code Playgroud)
更新:该错误实际上是由于前一段时间弃用的"nowrap"属性的错误使用造成的.