Skip to content

Instantly share code, notes, and snippets.

@bobbyg603
Last active May 12, 2022 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobbyg603/ff5ceccc841966e25a4f870aa74373f1 to your computer and use it in GitHub Desktop.
Save bobbyg603/ff5ceccc841966e25a4f870aa74373f1 to your computer and use it in GitHub Desktop.
File Uploads with Angular and Express
private getFilesSubject = new BehaviorSubject<any>(null);
constructor(private httpClient: HttpClient) {
this.files$ = this.getFilesSubject.asObservable()
.pipe(
switchMap(() => this.httpClient.get<FilesTableEntry[]>('http://localhost:8080/files'))
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment