I don't know why it happens, It seems angular can't understand what I'm writing : This is my HttpClient code what I wrote:

    import { Component, OnInit } from '@angular/core';
    import { HttpClient } from '@angular/common/http';
    import { CreeperUser } from '../Models/CreeperUser';
    import { Observable } from 'rxjs';
    
    @Component({
        templateUrl: 'friends.component.html'
    })
    export class FriendsComponent {
        users: number;
    
        constructor(private http: HttpClient) {
            this.DisplayUser();
        } 
    
        public CallApi_HttpGet(): Observable<CreeperUser[]> {
            return this.http.get<CreeperUser[]> ('https://localhost:44399/api/user');
        }

        public DisplayUser(){
            this.CallApi_HttpGet().subscribe(response => {
                this.users = response[0].userId;
            });
        }
    }

And when I use the code to run on my server, the Chrome's console told me this: 

    Error: Uncaught (in promise): Error: StaticInjectorError(AppModule) 

[enter image description here][1]


  [1]: https://i.stack.imgur.com/GbpFI.jpg

And I don't know how can I do. Please help me!