build(bazel): update bazel integration test to test secondary angular imports such as @angular/common/http (#24170)
PR Close #24170
This commit is contained in:

committed by
Victor Berchet

parent
d579b8ce05
commit
0e1919c2db
19
integration/bazel/src/app.component.ts
Normal file
19
integration/bazel/src/app.component.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Observable} from 'rxjs';
|
||||
import {map, startWith} from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-component',
|
||||
template: `
|
||||
<hello-world-app></hello-world-app>
|
||||
<div>The current time is {{ time$ | async }}</div>
|
||||
`})
|
||||
export class AppComponent {
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
time$ = this.http.get('http://worldclockapi.com/api/json/pst/now').pipe(
|
||||
map((result: any) => result.currentDateTime),
|
||||
startWith(['...']));
|
||||
}
|
Reference in New Issue
Block a user