Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { Component, OnInit } from '@angular/core'
import { HttpClient } from '@angular/common/http'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {
title = 'ng-faunadb-netlify-serverless-functions'
constructor(private http: HttpClient) {}
ngOnInit() {
this.http.get('http://localhost:9000/.netlify/functions/products').subscribe((response) => {
console.log('response: ', response)
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.