代码如下:
<button [disabled]="submitEnable"
type="button"
class="btn btn-primary "
name = "button"
(click) ="onSubmit(addNewconnection.value);
addNewconnection.reset()"
data-dismiss="modal"
class="btn btn-success">
Submit</button>
请输入完整的HTML代码
答案 0 :(得分:0)
我不知道完整的HTML代码,但您可以使用Like this
<div class="container">
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">open</button>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<form [formGroup]="popupfrm" (ngSubmit)="onSubmit()">
<div class=" form-group form-group-margin user-input-wrp ">
<input type="text" class="form-control permit-input inputwidth inputText " max="16" name="name"
formControlName="name" required />
<span class="floating-label">Name</span>
</div>
<div class="form-group labelmargin user-input-wrp">
<label class="label labelfont">Body:</label>
<textarea [froalaEditor] formControlName="Message" rows="5" name="TranslationMailMessage" character="256"></textarea>
</div>
<div class="button-div">
<button type="submit" class="btn btn-default btn-add btn-border">Add</button>
<button type="submit" click='close()' class="btn btn-default btn-add btn-border">Cancel</button>
</div>
</form>
<div class="modal-footer">
<button [disabled]="submitEnable" type="button" class="btn btn-primary " name="button" (click)="onSubmit(addNewconnection.value);
addNewconnection.reset()"
data-dismiss="modal" class="btn btn-success">
Submit</button>
</div>
</div>
</div>
</div>
</div>