Last active
April 12, 2018 17:37
-
-
Save cyrilletuzi/1d05acb22f202a38f5ef67d54ee54f55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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) => {}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment