Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Last active November 23, 2020 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mayankgupta688/67fca46dbbfc47c9289c45dd6be41f1f to your computer and use it in GitHub Desktop.
Save Mayankgupta688/67fca46dbbfc47c9289c45dd6be41f1f to your computer and use it in GitHub Desktop.
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