import { Injectable } from '@angular/core' ; import { Observable } from 'rxjs/Observable' ; import { RestClient } from 'app/rest/rest.service' ; import { LoginData } from './auth.models' ; @ Injectable ( ) export class AuthService { post_login ( schemaName , formName , loginData ) { const loginPath = '/rpc/' + formName ; return this . restClient . post ( schemaName , loginPath , loginData ) ; } ; constructor ( private restClient ) { } }