When I try to add api connection part in the ionic provider from Angular web app service it shows Expected 0 arguments but got 1 in here:
@Injectable({
providedIn: 'root'
})
While the same is working in the Angular web project.
Ionic3 provider looks like this:
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
const BASEURL = 'http://domain...';
@Injectable({
providedIn: 'root'
})
export class AuthProvider {
constructor(private http: HttpClient) { }
RegisterUser(body): Observable<any> {
return this.http.post(`${BASEURL}/register`, body);
}
LoginUser(body): Observable<any> {
return this.http.post(`${BASEURL}/login`, body);
}
}
How to fix this?