Skip to content

Instantly share code, notes, and snippets.

@nanotroy
Created August 29, 2019 19:36
Show Gist options
  • Save nanotroy/13ed76147f39b76aa699f45a44600904 to your computer and use it in GitHub Desktop.
Save nanotroy/13ed76147f39b76aa699f45a44600904 to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
import { EchoService } from '../echo.service';
import { Observable } from 'rxjs';
@Component({
templateUrl: `second.component.html`,
styleUrls: ['./second.component.css']
})
export class SecondComponent implements OnInit {
public response: Observable<any>;
constructor(private echoService: EchoService) {}
public ngOnInit(): void {
this.response = this.echoService.makeCall();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment