import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Config } from '../../_helpers/config.class'; @Injectable() export class LoginService { constructor(private http: HttpClient) { } login(user) { return this.http.post(`${Config.getApiUrl()}/Account/Token`, {username: user.username , password: user.password}); } } //'username=' + user.username + '&password=' + user.password + '&grant_type=password'