i am calling rest api in angular5 and getting the following errors

Multi tool use
i am calling rest api in angular5 and getting the following errors
import { Component, OnInit } from '@angular/core';
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-rest',
templateUrl: './rest.component.html',
styleUrls: ['./rest.component.css']
})
@Injectable()
export class RestComponent {
constructor(private http: HttpClient) { }
configUrl = "http://34.201.147.118:3001/getAllData";
getConfig() {
return this.http.get(this.configUrl);
}
}
I am calling the rest api in the following code and everything seems fine until I complied it and got the following error
1. i 「wdm」: Compiled successfully. ERROR in
src/app/viewall/viewall.component.ts(13,5): error TS1068: Unexpected
token. A constructor, method, accessor, or property was expected.
src/app/viewall/viewall.component.ts(15,14): error TS1005: ';'
expected. src/app/viewall/viewall.component.ts(22,1): error TS1128:
Declaration or statement expected.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Your error is in viewall.component.ts file post that code as well
– Sanoj_V
Jun 30 at 8:52