Reputation: 78
I am currently working on an angular application. I am using *ngFor to add input fields because the number of inputs is not always the same (it depends on the data received from backend). I there a way to make sure that 2 input fields are placed on the same row?
The html code looks like this
<div *ngFor="let content of group?.Content">
<label>content.Title</label>
<input type="text">
</div>
Upvotes: 0
Views: 58
Reputation: 226
You can use Bootsrap of Flex to Make sure 2 inputs take a row . Example:
<div *ngFor="let X of Xs">
<input class='col-md-6' type="text" value='X'>
</div>
Upvotes: 1