|
- import { Injectable } from '@angular/core';
- import { URL } from '../data/url';
- import { HttpClient, HttpHeaders } from '@angular/common/http';
-
- @Injectable({
- providedIn: 'root'
- })
- export class OrderService {
- constructor(
- private http: HttpClient
- ) { }
-
- getOrders() {
- const httpOptions = {
- headers: new HttpHeaders({
- 'Access-Control-Allow-Origin': '*',
- 'Content-Type': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.vendor_token
- })
- };
- this.http.get(URL + '/api/maioraservice/orders/getallOrders/', httpOptions).toPromise();
- }
- }
|