Skip to content

Instantly share code, notes, and snippets.

@NishuGoel
Created February 21, 2019 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NishuGoel/1f3000aa17f274589a421d44b9c616f1 to your computer and use it in GitHub Desktop.
Save NishuGoel/1f3000aa17f274589a421d44b9c616f1 to your computer and use it in GitHub Desktop.
export class AppComponent implements OnInit {
users: User[] = [];
ngOnInit(){
this.getUsers();
}
getUsers() {
this.appservice.getUsers().subscribe(data => {
this.users = data;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment