i am trying to create dummy login from inmemory db angular without using any json file or live api for in memory service i am using users object
const users = [
{ id: 1, userName: 'abhijeet', password: 'abh@123'},
];
using http response
const url = `${environment.apiEndPoint}users?userName=^${user.userName}$&password=^${user.password}$`;
this.http.get<UserDetails>(url).subscribe(resp => {
let user = resp;
error is
{body: {…}, url: "/api/users?userName=^abhijeet$&password=^abh@123$", headers: HttpHeaders, status: 404, statusText: "Not Found"}
body:
error: "Collection 'undefined' not found"
__proto__: Object
headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}
status: 404
statusText: "Not Found"
url: "/api/users?userName=^abhijeet$&password=^abh@123$"
if i remove @ from password field and use underscore instead i am getting correct response but @ is not working for any filed.