Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component({
- template: `<p>{{data}}</p>`
- })
- export class SomeComponent implements OnInit {
- data: any;
- constructor(protected dataService: DataService) {}
- ngOnInit() {
- this.dataService.getData().subscribe((result) => {
- this.data = result;
- }, (error) => {});
- }
- }
Add Comment
Please, Sign In to add comment