Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente | |||
|
langages:angular:importer_fichier_texte_depuis_assets [2020/03/22 14:25] jonathan |
langages:angular:importer_fichier_texte_depuis_assets [2020/03/22 14:27] (Version actuelle) jonathan |
||
|---|---|---|---|
| Ligne 6: | Ligne 6: | ||
| import { HttpClient } from ' | import { HttpClient } from ' | ||
| - | // and then: | + | … |
| + | |||
| + | | ||
| + | private http: HttpClient | ||
| + | ) {} | ||
| + | |||
| + | … | ||
| this.http.get(' | this.http.get(' | ||
| .subscribe(data => console.log(data)); | .subscribe(data => console.log(data)); | ||
| </ | </ | ||