Last active
November 23, 2020 14:22
-
-
Save Mayankgupta688/67fca46dbbfc47c9289c45dd6be41f1f 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 { Injectable } from '@angular/core'; | |
import { Resolve } from '@angular/router'; | |
import { HttpClient } from "@angular/common/http"; | |
import { tap } from "rxjs/operators"; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class DataService implements Resolve<any> { | |
constructor(private _http: HttpClient) { | |
} | |
resolve() { | |
return this._http.get("https://5a530e1477e1d20012fa066a.mockapi.io/employeedata"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment