<div>
<div>
<span class="card-title">Add Item</span>
</div>
<form (ngSubmit)="onSubmit()" class="col s6">
<div class="row">
<div class="input-field col s6">
<input type="text" placeholder="Add Title" [(ngModel)]="item.title" name="title">
<label>Title</label>
</div>
<div class="input-field col s6">
<input type="text" placeholder="Add Description" [(ngModel)]="item.description" name="description">
<label>Description</label>
</div>
<input type="submit" value="Submit" class="btn">
</div>
</form>
</div>
</div>
尽管我不确定为什么会发生这种情况,但是我正在使用Angular和firebase创建一个简单的页面。特别是按钮和内联文本。我对此很陌生。
答案 0 :(得分:0)
因此,我假设您使用https://materializecss.com (从外观和类别名称开始),我认为您在标记中缺少卡片内容和卡片类别。
<div class="card">
<div class="card-content">
<span class="card-title">Add Item</span>
<form (ngSubmit)="onSubmit()" class="col s6">
<div class="row">
<div class="input-field col s6">
<input type="text" placeholder="Add Title" [(ngModel)]="item.title" name="title">
<label>Title</label>
</div>
<div class="input-field col s6">
<input type="text" placeholder="Add Description" [(ngModel)]="item.description" name="description">
<label>Description</label>
</div>
<input type="submit" value="Submit" class="btn">
</div>
</form>
</div>
</div>