Skip to content

Instantly share code, notes, and snippets.



Last active Apr 12, 2018
What would you like to do?
template: `<p>{{data}}</p>`
export class SomeComponent implements OnInit {
data: any;
constructor(protected dataService: DataService) {}
ngOnInit() {
this.dataService.getData().subscribe((result) => { = result;
}, (error) => {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment