Is that line return this.http.get(this.configUrl) return observable , If yes then why din't we import observable from rxjs.
Yes, the this.http.get(...) line returns an Observable. In general my code snippets don't include the imports.
In general you can import specific types you depend on but that isn't actually strictly necessary. The implementation of HttpClient.get imports Observable and returns it, so all you need to do is include the implementation of HttpClient, which you do.
In general ES6 imports are for things you directly depend on. Those imports will transitively import any things they depend on.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, the
this.http.get(...)
line returns an Observable. In general my code snippets don't include the imports.In general you can import specific types you depend on but that isn't actually strictly necessary. The implementation of
HttpClient.get
imports Observable and returns it, so all you need to do is include the implementation ofHttpClient
, which you do.In general ES6 imports are for things you directly depend on. Those imports will transitively import any things they depend on.