Created
December 10, 2020 19:11
-
-
Save roytouw7/c294dba193b881eaa0023f76f57e2f1b 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
import { Component, OnInit } from '@angular/core'; | |
import { ProductService } from 'src/app/services/data/product.service'; | |
import { Observable } from 'rxjs'; | |
import { Products_allProducts_data } from 'src/app/services/data/__generated__/Products'; | |
@Component({ | |
selector: 'app-list', | |
templateUrl: './list.component.html', | |
styleUrls: ['./list.component.scss'], | |
}) | |
export class ListComponent implements OnInit { | |
public products$: Observable<Products_allProducts_data[]>; | |
constructor(private productService: ProductService) { | |
this.products$ = this.productService.getProducts(); | |
} | |
ngOnInit(): void {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment