style: cap response div

This commit is contained in:
Devesh
2023-10-14 10:36:52 +05:30
parent ccb3b106dc
commit 7e4c750613
2 changed files with 13 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import { Component, ElementRef, ViewChild } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { concatMap, fromEvent, map } from 'rxjs';
import { Observable, Subscription, concatMap, fromEvent, map } from 'rxjs';
import { CommonModule } from '@angular/common';
@Component({
@@ -9,13 +9,15 @@ import { CommonModule } from '@angular/common';
selector: 'app-root',
template: `
<div class="form-container">
<span>Posible values: posts, comments, albums, photos, todos, users</span>
<span
>possible values: posts, comments, albums, photos, todos, users</span
>
</div>
<div class="form-container">
<input #inputRef type="text" placeholder="Enter text" />
<button #buttonRef>Fetch</button>
</div>
<div class="form-container">
<div class="response">
{{ response | json }}
</div>
`,
@@ -46,6 +48,13 @@ import { CommonModule } from '@angular/common';
border-radius: 4px;
cursor: pointer;
}
.response {
margin-left: 25%;
margin-top: 2%;
width: 50%;
text-align: center;
border: 1px solid #ccc;
}
`,
],
})