Skip to content

Instantly share code, notes, and snippets.

@nhamilakis
Last active October 16, 2019 08:59
Show Gist options
  • Save nhamilakis/978289c0b16008029d7555e0305f11ba to your computer and use it in GitHub Desktop.
Save nhamilakis/978289c0b16008029d7555e0305f11ba to your computer and use it in GitHub Desktop.
Get Stuff in Angular
class Corpus {
name: string;
}
@TrucAngularAUZEF
class MyCorporaComponent extends OnInit {
listCorpora : Array<Corpus> = [];
constructor(private api: MyAPIServiceDeLEspace){}
ngOninit(){
// se truc se lance a chaque l'initiation du component
this.api.getCorpus(1).subscribe(
(data) => this.listCorpora = data,
(err) => console.log('fuck there was error : ${err}'),
);
}
}
@injectStuff
class MyAPIServiceDeLEspace {
constructor(http: NGHTT){}
getCorpus(id: string){
return this.http.get('http://api/corpus/' + id )
}
}
<div *ngFor="corpora of listCorpora">
<span> {{ corpora.name }} </span>
</div>
@hadware
Copy link

hadware commented Oct 15, 2019

I’d just like to interject for a moment. What you’re refering to as Linux, is in fact, GNU/LInux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

@nhamilakis
Copy link
Author

file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment