iolnrksnjfrbhjlifdfljifenijlfnjfe kjfea nfra jkrf lfr rg
ejnreiönjöiefnjwefnöjaewkfnfefwnöawjnöef
This commit is contained in:
parent
496cafd32a
commit
a009acb4e3
2 changed files with 14 additions and 3 deletions
|
@ -8,7 +8,7 @@ import { httpInterceptor } from './service/http.interceptor';
|
|||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes, withDebugTracing()),
|
||||
provideRouter(routes),
|
||||
provideHttpClient(withInterceptors([httpInterceptor])),
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component, inject, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-users',
|
||||
imports: [],
|
||||
templateUrl: './users.component.html',
|
||||
})
|
||||
export default class UsersComponent {}
|
||||
export default class UsersComponent implements OnInit {
|
||||
private client = inject(HttpClient);
|
||||
ngOnInit() {
|
||||
console.log('AHHHH');
|
||||
console.log('AHHHHH');
|
||||
|
||||
this.client.get('https://dummyjson.com/users', {}).subscribe((response) => {
|
||||
console.log(response);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue