Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
|
langages:angular:importer_fichier_texte_depuis_assets [2020/03/22 14:25] jonathan créée |
langages:angular:importer_fichier_texte_depuis_assets [2020/03/22 14:27] (Version actuelle) jonathan |
||
|---|---|---|---|
| Ligne 3: | Ligne 3: | ||
| source: | source: | ||
| - | < | + | < |
| 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)); | ||
| </ | </ | ||