Commit 862fec6f by Your Name

add search

parent 74c076f9
export class Search {
type : string;
sDate : string;
eDate : string;
constructor(init? : Search){
Object.assign(this, init);
this.type = '';
this.sDate = '';
this.eDate = '';
}
}
\ No newline at end of file
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Search } from '../models/search.model';
@Injectable({ providedIn: 'root'})
export class SearchService {
constructor(private http: HttpClient) {}
url: string = "http://915e-49-0-64-28.ngrok.io";
listSearch: Search[] = []
getListSearch(){
return this.http.get<Search[]>(this.url + "/search");
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment