Skip to content

Commit

Permalink
Testing GET request
Browse files Browse the repository at this point in the history
  • Loading branch information
dudushy committed Mar 27, 2024
1 parent f9a6dde commit 1b5efb2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
30 changes: 29 additions & 1 deletion src/app/pages/test/test.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
<div id="{{TITLE}}-content" class="pageContent">
<i class="bi bi-bug-fill"></i>
<h1>allUsers</h1>

<div class="list">
<div class="list-item" *ngFor="let item of dataArray | keyvalue : app.defaultOrder">
<p>
{{item.key}}
</p>

<p>
{{item.value['id']}}
</p>

<p>
{{item.value['name']}}
</p>

<p>
{{item.value['username']}}
</p>

<p>
{{item.value['lastname']}}
</p>

<p>
{{item.value['email']}}
</p>
</div>
</div>
</div>
18 changes: 18 additions & 0 deletions src/app/pages/test/test.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,21 @@ i {
font-size: calc(var(--responsiveUnit) * 2);
color: #2bff00;
}

.list {
background: black;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;

.list-item {
background: white;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
}
}
5 changes: 4 additions & 1 deletion src/app/pages/test/test.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AppComponent } from '../../app.component';
export class TestComponent implements OnInit {
TITLE = 'TestComponent';

dataArray = [];
dataArray: any[] = [];

constructor(
private cdr: ChangeDetectorRef,
Expand Down Expand Up @@ -52,6 +52,9 @@ export class TestComponent implements OnInit {
}
).subscribe((data: any) => {
console.log(`[${this.TITLE}#loadDataArray] data`, data);

this.dataArray = data.data;
console.log(`[${this.TITLE}#loadDataArray] this.dataArray`, this.dataArray);
});
}
}

0 comments on commit 1b5efb2

Please sign in to comment.