Created
April 4, 2020 17:16
-
-
Save gioragutt/ce4975d6ecdb361caf01b9fa02731165 to your computer and use it in GitHub Desktop.
Examples discussion
This file contains hidden or 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
class Component { | |
data$ = this.service.getData(); | |
constructor(private service: Service) { } | |
} | |
class Component { | |
data$: Observable<Data>; | |
constructor(private service: Service) { | |
this.data$ = service.getData(); | |
} | |
} | |
class Component implements OnInit { | |
data$: Observable<Data>; | |
constructor(private service: Service) {} | |
ngOnInit() { | |
this.data$ = service.getData(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment